From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:00:09 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:00:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404642.1638301 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KLc-0006yC-Kd; Tue, 01 Sep 2026 09:00:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404642.1638301; Tue, 01 Sep 2026 09:00:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KLc-0006xp-Ht; Tue, 01 Sep 2026 09:00:04 +0000
Received: by outflank-mailman (input) for mailman id 1404642;
 Tue, 01 Sep 2026 09:00:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KLa-0006eW-Ss
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:00:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KLa-0008nG-30
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KLa-004ufe-1v
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=e6tuL+OVltl852t/LUicBjPjLbbjkvbOlv13748ByhE=; b=L/zuKE0f2H8kJF3wPzTbhVpy9P
	ELXft/mm56tejzECJfx8z6Y17s18sNmxuFkTmHnLpU8JQ0ZTxVqDG6/GmjTejjOisAKMg8k8R+O57
	mpROkyFw1pM6i7ic4zYbQ5VMSSOUV/EaipCJbm6/SA/P8yJ+NRVWgwsIBB0vMR38/NAY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] XSM: make xsm_default_action() const-correct
Message-Id: <E1x1KLa-004ufe-1v@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:00:02 +0000

commit c0308bdfb7c85c72d7242db4d179de205ca6d365
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:52:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:52:45 2026 +0200

    XSM: make xsm_default_action() const-correct
    
    To be able to properly use const on dummy hook function parameters, add
    const to both domain pointers.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/include/xsm/dummy.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 7af5cbdfb7..ffb5ae7831 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -76,7 +76,7 @@ void __xsm_action_mismatch_detected(void);
 #endif /* CONFIG_XSM */
 
 static always_inline int xsm_default_action(
-    xsm_default_t action, struct domain *src, struct domain *target)
+    xsm_default_t action, const struct domain *src, const struct domain *target)
 {
     switch ( action ) {
     case XSM_HOOK:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:00:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:00:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404643.1638305 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KLm-0007QT-M0; Tue, 01 Sep 2026 09:00:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404643.1638305; Tue, 01 Sep 2026 09:00:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KLm-0007QM-JG; Tue, 01 Sep 2026 09:00:14 +0000
Received: by outflank-mailman (input) for mailman id 1404643;
 Tue, 01 Sep 2026 09:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KLk-0007P3-R4
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KLl-0008nK-0C
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KLk-004wup-2R
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=247pq7XhS65G99ASIe95yK3yR8Lg0wLsP04H0/R9hmU=; b=MkT4GIp1q6QjEP5LEf1XDbW6BM
	QUXQBI4dJIx4It9M8SZ5UpLX902QbkoV4+T/xj/CbfHuAZYYiSlzXONRWyeNhEm1LuuNc4AfI2rTO
	UrefzR/JvR1KapHlQbeyxLDnbC60ODZxTLFTeneu98ouEuHsrVdQhI6pEKG3CPkAijmk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] XSM: convert "allow" (Flask: "access") parameters to bool
Message-Id: <E1x1KLk-004wup-2R@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:00:12 +0000

commit 8eb26a701bf5b6c9493c09f4f96299604cb870e7
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:53:40 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:53:40 2026 +0200

    XSM: convert "allow" (Flask: "access") parameters to bool
    
    These are boolean, so they should always have used bool (originally
    bool_t), not uint8_t. Leverage recent changes to arrange for this with
    (now) fewer places which need changing (within the XSM machinery itself).
    Adjust call sites as well, where the conversion wasn't done so far.
    
    While doing this, rename flask_io{port,mem}_mapping()'s last parameters to
    "map".
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/arch/x86/domctl.c          |  7 ++++---
 xen/arch/x86/pci.c             |  2 +-
 xen/arch/x86/pv/emul-priv-op.c |  2 +-
 xen/include/xsm/dummy.h        | 14 +++++++-------
 xen/include/xsm/hooks.h        | 14 +++++++-------
 xen/xsm/flask/hooks.c          | 19 ++++++++++---------
 6 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 6e42fa383c..51d62617bb 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -235,7 +235,7 @@ long arch_do_domctl(
     {
         unsigned int fp = domctl->u.ioport_permission.first_port;
         unsigned int np = domctl->u.ioport_permission.nr_ports;
-        int allow = domctl->u.ioport_permission.allow_access;
+        bool allow = domctl->u.ioport_permission.allow_access;
 
         ret = -EINVAL;
         if ( (fp + np) <= fp || (fp + np) > MAX_IOPORTS )
@@ -306,7 +306,8 @@ long arch_do_domctl(
             break;
         }
 
-        ret = xsm_irq_permission(XSM_PRIV, d, irq, flags);
+        ret = xsm_irq_permission(XSM_PRIV, d, irq,
+                                 flags & XEN_DOMCTL_GSI_ACTION_MASK);
         if ( ret )
             break;
 
@@ -687,7 +688,7 @@ long arch_do_domctl(
         unsigned int fgp = domctl->u.ioport_mapping.first_gport;
         unsigned int fmp = domctl->u.ioport_mapping.first_mport;
         unsigned int np = domctl->u.ioport_mapping.nr_ports;
-        unsigned int add = domctl->u.ioport_mapping.add_mapping;
+        bool add = domctl->u.ioport_mapping.add_mapping;
         struct hvm_domain *hvm;
         struct g2m_ioport *g2m_ioport;
         int found = 0;
diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index fd0715fb6a..1aefeab663 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -78,7 +78,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 {
     struct pci_dev *pdev;
     int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
-                                       reg, reg + size - 1, 1);
+                                       reg, reg + size - 1, true);
 
     if ( rc < 0 )
         return rc;
diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index 7bebd2ccdc..dc21515e44 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -260,7 +260,7 @@ static bool pci_cfg_ok(struct domain *currd, unsigned int start,
 
     return !write ?
            xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
-                                     start, start + size - 1, 0) == 0 :
+                                     start, start + size - 1, false) == 0 :
            pci_conf_write_intercept(0, machine_bdf, start, size, write) >= 0;
 }
 
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index ffb5ae7831..a47e7c5bf2 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -505,21 +505,21 @@ static XSM_INLINE int xsm_unmap_domain_irq(
 }
 
 static XSM_INLINE int xsm_irq_permission(
-    XSM_DEFAULT_ARG struct domain *d, int pirq, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, int pirq, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
 
 static XSM_INLINE int xsm_iomem_permission(
-    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
 
 static XSM_INLINE int xsm_iomem_mapping(
-    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
     return xsm_default_action(action, current->domain, d);
@@ -527,7 +527,7 @@ static XSM_INLINE int xsm_iomem_mapping(
 
 #ifdef CONFIG_HAS_VPCI
 static XSM_INLINE int xsm_iomem_mapping_vpci(
-    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
     return xsm_default_action(action, current->domain, d);
@@ -537,7 +537,7 @@ static XSM_INLINE int xsm_iomem_mapping_vpci(
 #ifdef CONFIG_HAS_PCI
 static XSM_INLINE int xsm_pci_config_permission(
     XSM_DEFAULT_ARG struct domain *d, uint32_t machine_bdf, uint16_t start,
-    uint16_t end, uint8_t access)
+    uint16_t end, bool access)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
     return xsm_default_action(action, current->domain, d);
@@ -709,14 +709,14 @@ static XSM_INLINE int xsm_priv_mapping(
 }
 
 static XSM_INLINE int xsm_ioport_permission(
-    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
 
 static XSM_INLINE int xsm_ioport_mapping(
-    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
     return xsm_default_action(action, current->domain, d);
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index 1e558bf710..ec109f87c1 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -77,12 +77,12 @@ XSM_HOOK(int, unmap_domain_irq, struct domain *, int, const void *)
 XSM_HOOK(int, bind_pt_irq, struct domain *, struct xen_domctl_bind_pt_irq *)
 XSM_HOOK(int, unbind_pt_irq, struct domain *, struct xen_domctl_bind_pt_irq *)
 
-XSM_HOOK(int, irq_permission, struct domain *, int, uint8_t)
-XSM_HOOK(int, iomem_permission, struct domain *, uint64_t, uint64_t, uint8_t)
+XSM_HOOK(int, irq_permission, struct domain *, int, bool)
+XSM_HOOK(int, iomem_permission, struct domain *, uint64_t, uint64_t, bool)
 
-XSM_HOOK(int, iomem_mapping, struct domain *, uint64_t, uint64_t, uint8_t)
+XSM_HOOK(int, iomem_mapping, struct domain *, uint64_t, uint64_t, bool)
 #ifdef CONFIG_HAS_VPCI
-XSM_HOOK(int, iomem_mapping_vpci, struct domain *, uint64_t, uint64_t, uint8_t)
+XSM_HOOK(int, iomem_mapping_vpci, struct domain *, uint64_t, uint64_t, bool)
 #endif
 
 #if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
@@ -97,7 +97,7 @@ XSM_HOOK(int, resource_setup_misc)
 XSM_HOOK(int, resource_setup_pci, uint32_t)
 XSM_HOOK(int, resource_setup_gsi, int)
 XSM_HOOK(int, pci_config_permission, struct domain *, uint32_t, uint16_t,
-                                     uint16_t, uint8_t)
+                                     uint16_t, bool)
 #endif
 
 #ifdef CONFIG_HYPFS
@@ -142,8 +142,8 @@ XSM_HOOK(int, mmuext_op, struct domain *, struct domain *)
 XSM_HOOK(int, update_va_mapping, struct domain *, struct domain *, l1_pgentry_t)
 #endif /* CONFIG_PV */
 XSM_HOOK(int, priv_mapping, struct domain *, struct domain *)
-XSM_HOOK(int, ioport_permission, struct domain *, uint32_t, uint32_t, uint8_t)
-XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, uint32_t, uint8_t)
+XSM_HOOK(int, ioport_permission, struct domain *, uint32_t, uint32_t, bool)
+XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, uint32_t, bool)
 XSM_HOOK(int, pmu_op, struct domain *, unsigned int)
 #endif /* CONFIG_X86 */
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 11a77f0e28..3c0f62f057 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -998,7 +998,7 @@ static int cf_check flask_sysctl(const struct xen_sysctl *op)
 }
 #endif /* CONFIG_SYSCTL */
 
-static inline uint32_t resource_to_perm(uint8_t access)
+static inline uint32_t resource_to_perm(bool access)
 {
     if ( access )
         return RESOURCE__ADD;
@@ -1166,7 +1166,7 @@ static int cf_check flask_unbind_pt_irq(
 }
 
 static int cf_check flask_irq_permission(
-    struct domain *d, int pirq, uint8_t access)
+    struct domain *d, int pirq, bool access)
 {
     /* the PIRQ number is not useful; real IRQ is checked during mapping */
     return current_has_perm(d, SECCLASS_RESOURCE, resource_to_perm(access));
@@ -1199,7 +1199,7 @@ static int cf_check _iomem_has_perm(
 }
 
 static int cf_check flask_iomem_permission(
-    struct domain *d, uint64_t start, uint64_t end, uint8_t access)
+    struct domain *d, uint64_t start, uint64_t end, bool access)
 {
     struct iomem_has_perm_data data;
     int rc;
@@ -1221,16 +1221,17 @@ static int cf_check flask_iomem_permission(
     return security_iterate_iomem_sids(start, end, _iomem_has_perm, &data);
 }
 
-static int cf_check flask_iomem_mapping(struct domain *d, uint64_t start, uint64_t end, uint8_t access)
+static int cf_check flask_iomem_mapping(
+    struct domain *d, uint64_t start, uint64_t end, bool map)
 {
-    return flask_iomem_permission(d, start, end, access);
+    return flask_iomem_permission(d, start, end, map);
 }
 #define flask_iomem_mapping_vpci flask_iomem_mapping
 
 #ifdef CONFIG_HAS_PCI
 static int cf_check flask_pci_config_permission(
     struct domain *d, uint32_t machine_bdf, uint16_t start, uint16_t end,
-    uint8_t access)
+    bool access)
 {
     uint32_t dsid, rsid;
     int rc = -EPERM;
@@ -1709,7 +1710,7 @@ static int cf_check _ioport_has_perm(
 }
 
 static int cf_check flask_ioport_permission(
-    struct domain *d, uint32_t start, uint32_t end, uint8_t access)
+    struct domain *d, uint32_t start, uint32_t end, bool access)
 {
     int rc;
     struct ioport_has_perm_data data;
@@ -1733,9 +1734,9 @@ static int cf_check flask_ioport_permission(
 }
 
 static int cf_check flask_ioport_mapping(
-    struct domain *d, uint32_t start, uint32_t end, uint8_t access)
+    struct domain *d, uint32_t start, uint32_t end, bool map)
 {
-    return flask_ioport_permission(d, start, end, access);
+    return flask_ioport_permission(d, start, end, map);
 }
 
 #ifdef CONFIG_MEM_SHARING
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:00:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:00:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404645.1638310 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KLw-0007Sv-NS; Tue, 01 Sep 2026 09:00:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404645.1638310; Tue, 01 Sep 2026 09:00:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KLw-0007So-Ki; Tue, 01 Sep 2026 09:00:24 +0000
Received: by outflank-mailman (input) for mailman id 1404645;
 Tue, 01 Sep 2026 09:00:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KLu-0007Sg-VN
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:00:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KLv-0008nR-0d
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KLu-004yvC-2r
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ojX48YJNGdgXTzFF3gBJqvdrBymp1r2cEK5z8qL1xUw=; b=PTjqYiNFbKfYU+cbvsaBwAo1r2
	fVknsSEoFxqLu7U5X9g1F4nesq9Pp+i6uxZyUksZDItiuUtvT+yFODZyEDGVSsBDezg8ik5iQZClJ
	X5LOSF/DgGRYKlml3mfIiNfZrrLXpYoWFVAlwc64/IcsrBswk3BfZ/hHKzJDolqC04BA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] XSM: make Argo hooks well-formed ones
Message-Id: <E1x1KLu-004yvC-2r@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:00:22 +0000

commit 72aa7d65b6b5f23d1cf8f5e457f73aa55616c1ed
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:54:46 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:54:46 2026 +0200

    XSM: make Argo hooks well-formed ones
    
    For whatever reason they didn't have an xsm_default_t first argument (to
    cope with XSM=n mode), making it impossible to (easily) cover them in
    xsm/hooks.h.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/argo.c       | 21 +++++++++++----------
 xen/include/xsm/dummy.h | 21 +++++++++++++--------
 xen/include/xsm/hooks.h |  8 ++++++++
 xen/include/xsm/xsm.h   | 32 --------------------------------
 xen/xsm/dummy.c         |  7 -------
 xen/xsm/flask/hooks.c   |  7 -------
 6 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/xen/common/argo.c b/xen/common/argo.c
index 3c38a51d09..42dd516a18 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -1341,7 +1341,7 @@ fill_ring_data(const struct domain *currd,
      * Don't supply information about rings that a guest is not
      * allowed to send to.
      */
-    ret = xsm_argo_send(currd, dst_d);
+    ret = xsm_argo_send(XSM_HOOK, currd, dst_d);
     if ( ret )
         goto out;
 
@@ -1666,8 +1666,9 @@ register_ring(struct domain *currd,
 
     if ( reg.partner_id == XEN_ARGO_DOMID_ANY )
     {
-        ret = opt_argo_mac_permissive ? xsm_argo_register_any_source(currd) :
-                                        -EPERM;
+        ret = opt_argo_mac_permissive
+              ? xsm_argo_register_any_source(XSM_HOOK, currd)
+              : -EPERM;
         if ( ret )
             return ret;
     }
@@ -1680,7 +1681,7 @@ register_ring(struct domain *currd,
             return -ESRCH;
         }
 
-        ret = xsm_argo_register_single_source(currd, dst_d);
+        ret = xsm_argo_register_single_source(XSM_HOOK, currd, dst_d);
         if ( ret )
             goto out;
 
@@ -2002,7 +2003,7 @@ sendv(struct domain *src_d, xen_argo_addr_t *src_addr,
     if ( !dst_d )
         return -ESRCH;
 
-    ret = xsm_argo_send(src_d, dst_d);
+    ret = xsm_argo_send(XSM_HOOK, src_d, dst_d);
     if ( ret )
     {
         gprintk(XENLOG_ERR, "argo: XSM REJECTED %i -> %i\n",
@@ -2100,7 +2101,7 @@ do_argo_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1,
     if ( unlikely(!opt_argo) )
         return -EOPNOTSUPP;
 
-    rc = xsm_argo_enable(currd);
+    rc = xsm_argo_enable(XSM_HOOK, currd);
     if ( rc )
         return rc;
 
@@ -2242,7 +2243,7 @@ compat_argo_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1,
     if ( unlikely(!opt_argo) )
         return -EOPNOTSUPP;
 
-    rc = xsm_argo_enable(currd);
+    rc = xsm_argo_enable(XSM_HOOK, currd);
     if ( rc )
         return rc;
 
@@ -2307,7 +2308,7 @@ argo_init(struct domain *d)
 {
     struct argo_domain *argo;
 
-    if ( !opt_argo || xsm_argo_enable(d) )
+    if ( !opt_argo || xsm_argo_enable(XSM_HOOK, d) )
     {
         argo_dprintk("argo disabled, domid: %u\n", d->domain_id);
         return 0;
@@ -2365,8 +2366,8 @@ argo_soft_reset(struct domain *d)
         wildcard_rings_pending_remove(d);
 
         /*
-         * Since neither opt_argo or xsm_argo_enable(d) can change at runtime,
-         * if d->argo is true then both opt_argo and xsm_argo_enable(d) must be
+         * Since neither opt_argo nor xsm_argo_enable() can change at runtime,
+         * if d->argo is true then both opt_argo and xsm_argo_enable() must be
          * true, and we can assume that init is allowed to proceed again here.
          */
         argo_domain_init(d->argo);
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index a47e7c5bf2..65df405dbf 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -749,27 +749,32 @@ static XSM_INLINE int xsm_dm_op(XSM_DEFAULT_ARG struct domain *d)
 #endif
 
 #ifdef CONFIG_ARGO
-static XSM_INLINE int xsm_argo_enable(const struct domain *d)
+
+static XSM_INLINE int xsm_argo_enable(XSM_DEFAULT_ARG const struct domain *d)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, NULL);
 }
 
 static XSM_INLINE int xsm_argo_register_single_source(
-    const struct domain *d, const struct domain *t)
+    XSM_DEFAULT_ARG const struct domain *d, const struct domain *t)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, t);
 }
 
 static XSM_INLINE int xsm_argo_register_any_source(
-    const struct domain *d)
+    XSM_DEFAULT_ARG const struct domain *d)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, NULL);
 }
 
 static XSM_INLINE int xsm_argo_send(
-    const struct domain *d, const struct domain *t)
+    XSM_DEFAULT_ARG const struct domain *d, const struct domain *t)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, t);
 }
 
 #endif /* CONFIG_ARGO */
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index ec109f87c1..87cf6e5af6 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -159,6 +159,14 @@ XSM_HOOK(int, do_xsm_op, XEN_GUEST_HANDLE_PARAM(void))
 XSM_HOOK(int, do_compat_op, XEN_GUEST_HANDLE_PARAM(void))
 #endif
 
+#ifdef CONFIG_ARGO
+XSM_HOOK(int, argo_enable, const struct domain *)
+XSM_HOOK(int, argo_register_single_source, const struct domain *,
+                                           const struct domain *)
+XSM_HOOK(int, argo_register_any_source, const struct domain *)
+XSM_HOOK(int, argo_send, const struct domain *, const struct domain *)
+#endif
+
 #undef XSM_HOOK0
 #undef XSM_HOOK1
 #undef XSM_HOOK2
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index b94f0cd0fd..9809e005e0 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -85,14 +85,6 @@ struct xsm_ops {
     char *(*show_security_evtchn)(struct domain *d, const struct evtchn *chn);
 
     char *(*show_irq_sid)(int irq);
-
-#ifdef CONFIG_ARGO
-    int (*argo_enable)(const struct domain *d);
-    int (*argo_register_single_source)(const struct domain *d,
-                                       const struct domain *t);
-    int (*argo_register_any_source)(const struct domain *d);
-    int (*argo_send)(const struct domain *d, const struct domain *t);
-#endif
 };
 
 #ifdef CONFIG_XSM
@@ -196,30 +188,6 @@ static inline char *xsm_show_irq_sid(int irq)
     return alternative_call(xsm_ops.show_irq_sid, irq);
 }
 
-#ifdef CONFIG_ARGO
-static inline int xsm_argo_enable(const struct domain *d)
-{
-    return alternative_call(xsm_ops.argo_enable, d);
-}
-
-static inline int xsm_argo_register_single_source(
-    const struct domain *d, const struct domain *t)
-{
-    return alternative_call(xsm_ops.argo_register_single_source, d, t);
-}
-
-static inline int xsm_argo_register_any_source(const struct domain *d)
-{
-    return alternative_call(xsm_ops.argo_register_any_source, d);
-}
-
-static inline int xsm_argo_send(const struct domain *d, const struct domain *t)
-{
-    return alternative_call(xsm_ops.argo_send, d, t);
-}
-
-#endif /* CONFIG_ARGO */
-
 #endif /* XSM_NO_WRAPPERS */
 
 #ifdef CONFIG_MULTIBOOT
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 046c0cb59e..c61c5875b8 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -35,13 +35,6 @@ static const struct xsm_ops __initconst_cf_clobber dummy_ops = {
     .show_security_evtchn          = xsm_show_security_evtchn,
 
     .show_irq_sid                  = xsm_show_irq_sid,
-
-#ifdef CONFIG_ARGO
-    .argo_enable                   = xsm_argo_enable,
-    .argo_register_single_source   = xsm_argo_register_single_source,
-    .argo_register_any_source      = xsm_argo_register_any_source,
-    .argo_send                     = xsm_argo_send,
-#endif
 };
 
 void __init xsm_fixup_ops(struct xsm_ops *ops)
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 3c0f62f057..902857415b 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1969,13 +1969,6 @@ static const struct xsm_ops __initconst_cf_clobber flask_ops = {
     .show_security_evtchn = flask_show_security_evtchn,
 
     .show_irq_sid = flask_show_irq_sid,
-
-#ifdef CONFIG_ARGO
-    .argo_enable = flask_argo_enable,
-    .argo_register_single_source = flask_argo_register_single_source,
-    .argo_register_any_source = flask_argo_register_any_source,
-    .argo_send = flask_argo_send,
-#endif
 };
 
 const struct xsm_ops *__init flask_init(
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:00:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:00:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404646.1638314 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KM6-0007Uz-P8; Tue, 01 Sep 2026 09:00:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404646.1638314; Tue, 01 Sep 2026 09:00:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KM6-0007Ur-MM; Tue, 01 Sep 2026 09:00:34 +0000
Received: by outflank-mailman (input) for mailman id 1404646;
 Tue, 01 Sep 2026 09:00:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KM5-0007Ug-2X
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:00:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KM5-0008nV-0y
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KM5-0050oc-00
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zBHc60BsQ/xvRHyfxcv+U2lXIUL8AvtCFd1FFXOmPrs=; b=QNFAyVuyI+G9c9Rpu788T2VokN
	FEqWrDgaba4yOpt9EWtqJqcJQroPFr6csa22Uw/tomPoweLHyYeg2LBP2Zf/05WqFOOt6vHS4ULtH
	+oKV7MhejxuL4bmUL8LTXC4dIGApIYtsvblkV7A5Ln1WVKavrp01Ja8knZOO9lrpfLwo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] RISC-V: place .sdata / .srodata / .riscv.attributes
Message-Id: <E1x1KM5-0050oc-00@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:00:33 +0000

commit c01408981554e59ba4f6d0ac492f431e3aa313fa
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:55:13 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:55:13 2026 +0200

    RISC-V: place .sdata / .srodata / .riscv.attributes
    
    Of the short-data sections, only .sbss is presently mentioned in the
    linker script. Place them next to, but ahead of their "normal" data
    sections.
    
    .riscv.attributes can go towards the tail of the image, next to (ahead of)
    debug info.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/xen.lds.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
index 65f136dce9..70db658fef 100644
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -44,6 +44,8 @@ SECTIONS
 
         BUGFRAMES
 
+        *(.srodata)
+        *(.srodata.*)
         *(.rodata)
         *(.rodata.*)
         VPCI_ARRAY
@@ -92,6 +94,7 @@ SECTIONS
         SCHEDULER_ARRAY
         HYPFS_PARAM
 
+        *(.sdata .sdata.*)
         *(.data .data.*)
         CONSTRUCTORS
     } :text
@@ -162,6 +165,8 @@ SECTIONS
     /* Section for the device tree blob (if any). */
     .dtb : { *(.dtb) } :text
 
+    .riscv.attributes : { *(.riscv.attributes) }
+
     DWARF2_DEBUG_SECTIONS
 
     DISCARD_SECTIONS
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:00:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:00:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404647.1638318 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMG-0007Ww-R3; Tue, 01 Sep 2026 09:00:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404647.1638318; Tue, 01 Sep 2026 09:00:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMG-0007Wo-Nh; Tue, 01 Sep 2026 09:00:44 +0000
Received: by outflank-mailman (input) for mailman id 1404647;
 Tue, 01 Sep 2026 09:00:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KMF-0007Wh-5P
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:00:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMF-0008nw-1H
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMF-0052WC-0L
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=mwLGBPKx2/YvEepx1ifOdwNGMiGz2XwXkYcMeSpNC+w=; b=55MmSzqac7RnPWWN2kwcsAS4H7
	OGQ2a6JrMD8oXCtDepDBxWH0ftKSX8uuk0LkZjpra/rKGn/kxuKe9g8x5C+1iBcXsgdngPAa2Qnrw
	k9Frwx61FxVVc1YDJeb1+cqdZ3VU/ivK6TlpJSdI82r4AJeXMccj+euq9nkkmZNbZCPs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] flask: add const qualifier to security_context_to_sid()
Message-Id: <E1x1KMF-0052WC-0L@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:00:43 +0000

commit 95509915ea881f5a9b5e9138e5e9ce2bc19a033c
Author:     Sergiy Kibrik <Sergiy_Kibrik@epam.com>
AuthorDate: Tue Sep 1 09:55:47 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:55:47 2026 +0200

    flask: add const qualifier to security_context_to_sid()
    
    The function does not modify context argument.
    Also it gives more flexibility to this API usage, because some context strings
    in Xen are also const char*.
    
    While there,
    - harmonize last parameter's name,
    - u32 -> uint32_t.
    
    Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/xsm/flask/include/security.h | 3 ++-
 xen/xsm/flask/ss/services.c      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/xsm/flask/include/security.h b/xen/xsm/flask/include/security.h
index ec8b442a8f..a4823fbcc9 100644
--- a/xen/xsm/flask/include/security.h
+++ b/xen/xsm/flask/include/security.h
@@ -76,7 +76,8 @@ int security_change_sid(u32 ssid, u32 tsid, u16 tclass, u32 *out_sid);
 
 int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len);
 
-int security_context_to_sid(char *scontext, u32 scontext_len, u32 *out_sid);
+int security_context_to_sid(const char *scontext, uint32_t scontext_len,
+                            uint32_t *sid);
 
 int security_get_allow_unknown(void);
 
diff --git a/xen/xsm/flask/ss/services.c b/xen/xsm/flask/ss/services.c
index 35ad1034ca..57beaafa9f 100644
--- a/xen/xsm/flask/ss/services.c
+++ b/xen/xsm/flask/ss/services.c
@@ -813,7 +813,8 @@ out:
  * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient
  * memory is available, or 0 on success.
  */
-int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid)
+int security_context_to_sid(
+    const char *scontext, uint32_t scontext_len, uint32_t *sid)
 {
     char *scontext2;
     struct context context;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:00:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:00:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404648.1638321 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMQ-0007ZM-TL; Tue, 01 Sep 2026 09:00:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404648.1638321; Tue, 01 Sep 2026 09:00:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMQ-0007ZE-Qg; Tue, 01 Sep 2026 09:00:54 +0000
Received: by outflank-mailman (input) for mailman id 1404648;
 Tue, 01 Sep 2026 09:00:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KMP-0007Z5-93
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:00:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMP-0008o0-1e
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMP-0054Dc-0i
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:00:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=HI1w+v327CGLFvypLQ9MdXpm5aKRm2QkrmJZCo4UJ80=; b=f38QWDfIrPoAYBrV2zv6yEvp6P
	Qls6+EF/VcMF115Atmi27myw+oEln6gcRcVKid4SgI0hLDb0C/30TzWjHKWm07hS6IlzdNYaoNukL
	C4xNlIlZiV5Ls6oLHHbpf1YhEfI5fq6vW758wbuYBnlRRN+jAZNh8G92gHyR9YqwBNLk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: drop pregs from struct cpu_user_regs
Message-Id: <E1x1KMP-0054Dc-0i@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:00:53 +0000

commit f3100b986e564b5ba39a7170b1d7a1ae2b7cdf07
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Tue Sep 1 09:57:13 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:57:13 2026 +0200

    xen/riscv: drop pregs from struct cpu_user_regs
    
    As nothing is using pregs in upstream or downstream ports of RISC-V drop
    it from struct cpu_user_regs. Once it will really be needed re-introduce
    it.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/processor.h | 2 --
 xen/arch/riscv/riscv64/asm-offsets.c   | 1 -
 2 files changed, 3 deletions(-)

diff --git a/xen/arch/riscv/include/asm/processor.h b/xen/arch/riscv/include/asm/processor.h
index 6b89df4a2d..b1745c1071 100644
--- a/xen/arch/riscv/include/asm/processor.h
+++ b/xen/arch/riscv/include/asm/processor.h
@@ -50,8 +50,6 @@ struct cpu_user_regs
     unsigned long sepc;
     unsigned long sstatus;
     unsigned long hstatus;
-    /* pointer to previous stack_cpu_regs */
-    unsigned long pregs;
 };
 
 /* TODO: need to implement */
diff --git a/xen/arch/riscv/riscv64/asm-offsets.c b/xen/arch/riscv/riscv64/asm-offsets.c
index 472cced4f8..1290b9dbbe 100644
--- a/xen/arch/riscv/riscv64/asm-offsets.c
+++ b/xen/arch/riscv/riscv64/asm-offsets.c
@@ -50,7 +50,6 @@ void asm_offsets(void)
     OFFSET(CPU_USER_REGS_SEPC, struct cpu_user_regs, sepc);
     OFFSET(CPU_USER_REGS_SSTATUS, struct cpu_user_regs, sstatus);
     OFFSET(CPU_USER_REGS_HSTATUS, struct cpu_user_regs, hstatus);
-    OFFSET(CPU_USER_REGS_PREGS, struct cpu_user_regs, pregs);
     BLANK();
     DEFINE(PCPU_INFO_SIZE, sizeof(struct pcpu_info));
     BLANK();
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:01:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:01:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404649.1638325 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMa-0007bO-Uc; Tue, 01 Sep 2026 09:01:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404649.1638325; Tue, 01 Sep 2026 09:01:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMa-0007bG-S8; Tue, 01 Sep 2026 09:01:04 +0000
Received: by outflank-mailman (input) for mailman id 1404649;
 Tue, 01 Sep 2026 09:01:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KMZ-0007b4-Df
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:01:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMZ-0008oI-26
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMZ-0055xJ-16
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Dxwy48dJRyfXbV2colHio0lQMiPIviNr9FOXaXyj9+E=; b=FkPIWwJASa/E+YveueKI7nQihv
	DkL7GR4Yh8qbgcXg22+o5TtzmZAhbgP3ykkYmjLHLA/Cif8/oDBLmFRi+5zkp43rQM181RDOu7JPC
	BODB+TcWu668zDF6qICdC0UzQLmNn+TFfQBgNk34brGZXdH7HWuNGG0L4cp9dXc38ntM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: drop bug.h's duplicate instruction length helpers
Message-Id: <E1x1KMZ-0055xJ-16@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:01:03 +0000

commit 2822d55ea88b4bb0345cd918cfc5465d2791c9dd
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Tue Sep 1 09:57:58 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:57:58 2026 +0200

    xen/riscv: drop bug.h's duplicate instruction length helpers
    
    asm/riscv_encoding.h already provides INSN_16BIT_MASK and INSN_LEN(), and
    emulate.c uses them, so the tree carried two spellings of the same thing
    which could drift apart. COMPRESSED_INSN_MASK never had a user.
    
    No functional change.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/bug.h | 19 -------------------
 xen/arch/riscv/traps.c           |  2 +-
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/xen/arch/riscv/include/asm/bug.h b/xen/arch/riscv/include/asm/bug.h
index e6f2868816..c2cdc2dc2a 100644
--- a/xen/arch/riscv/include/asm/bug.h
+++ b/xen/arch/riscv/include/asm/bug.h
@@ -13,25 +13,6 @@
 
 #define BUG_INSTR "unimp"
 
-/*
- * The base instruction set has a fixed length of 32-bit naturally aligned
- * instructions.
- *
- * There are extensions of variable length ( where each instruction can be
- * any number of 16-bit parcels in length ).
- *
- * Compressed ISA is used now where the instruction length is 16 bit and
- * 'unimp' instruction, in this case, can be either 16 or 32 bit (
- * depending on if compressed ISA is used or not )
- */
-#define INSN_LENGTH_MASK        _UL(0x3)
-#define INSN_LENGTH_32          _UL(0x3)
-
-#define COMPRESSED_INSN_MASK    _UL(0xffff)
-
-#define GET_INSN_LENGTH(insn)                               \
-    (((insn) & INSN_LENGTH_MASK) == INSN_LENGTH_32 ? 4 : 2) \
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* ASM__RISCV__BUG_H */
diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c
index d35c013e13..10d6855d91 100644
--- a/xen/arch/riscv/traps.c
+++ b/xen/arch/riscv/traps.c
@@ -214,7 +214,7 @@ void do_trap(struct cpu_user_regs *cpu_regs)
                 die();
             }
 
-            cpu_regs->sepc += GET_INSN_LENGTH(*(uint16_t *)pc);
+            cpu_regs->sepc += INSN_LEN(*(const uint16_t *)pc);
 
             break;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:01:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:01:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404650.1638330 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMk-0007dP-W5; Tue, 01 Sep 2026 09:01:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404650.1638330; Tue, 01 Sep 2026 09:01:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMk-0007dH-TW; Tue, 01 Sep 2026 09:01:14 +0000
Received: by outflank-mailman (input) for mailman id 1404650;
 Tue, 01 Sep 2026 09:01:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KMj-0007d8-HO
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:01:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMj-0008oO-2T
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMj-0057yz-1W
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=7gNdH2MwjHXuEfRwG4fltAWdPJ/mD5MuKo+HF1OMxeY=; b=ElyrpIu04d3ayS3/CKsJu1iCAW
	lRKLXtW5GqswTv+oJeRO4Od3uT6KNIeTWBdmyIWqVKH2ljv8uxQGHRVBnJgdb37p730iuPquC9V9E
	bGbU2cL+u5BezGy8ZOxIfAlCxbdYGK4OUeNWEaaBInyhVPoomF3HVQb31xz/WYX1/l+8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/IO-APIC: address Misra 2.1 rule violations
Message-Id: <E1x1KMj-0057yz-1W@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:01:13 +0000

commit a1435a677c298c45e683add949587f6a060bf17f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:58:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:58:45 2026 +0200

    x86/IO-APIC: address Misra 2.1 rule violations
    
    In both functions cases 0..3 are handled, and a 2-bit mask is applied to
    the switch() expression. Therefore the default: cases are reported
    unreachable by Eclair. Subsume the "case 2" blocks each into the
    corresponding default ones.
    
    While there also drop all the pointless figure braces inside the various
    case blocks, inserting blank lines instead between them.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/io_apic.c | 72 +++++++++++++-------------------------------------
 1 file changed, 18 insertions(+), 54 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 8310314fbe..01cf8fc735 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -804,66 +804,48 @@ static int __init MPBIOS_polarity(int idx)
     switch (mp_irqs[idx].mpc_irqflag & 3)
     {
     case 0: /* conforms, ie. bus-type dependent polarity */
-    {
         switch (mp_bus_id_to_type[bus])
         {
         case MP_BUS_ISA: /* ISA pin */
-        {
             polarity = default_ISA_polarity(idx);
             break;
-        }
+
         case MP_BUS_EISA: /* EISA pin */
-        {
             polarity = default_EISA_polarity(idx);
             break;
-        }
+
         case MP_BUS_PCI: /* PCI pin */
-        {
             polarity = default_PCI_polarity(idx);
             break;
-        }
+
         case MP_BUS_MCA: /* MCA pin */
-        {
             polarity = default_MCA_polarity(idx);
             break;
-        }
+
         case MP_BUS_NEC98: /* NEC 98 pin */
-        {
             polarity = default_NEC98_polarity(idx);
             break;
-        }
+
         default:
-        {
             printk(KERN_WARNING "broken BIOS!!\n");
             polarity = 1;
             break;
         }
-        }
         break;
-    }
+
     case 1: /* high active */
-    {
         polarity = 0;
         break;
-    }
-    case 2: /* reserved */
-    {
-        printk(KERN_WARNING "broken BIOS!!\n");
-        polarity = 1;
-        break;
-    }
+
     case 3: /* low active */
-    {
         polarity = 1;
         break;
-    }
-    default: /* invalid */
-    {
+
+    default: /* reserved */
         printk(KERN_WARNING "broken BIOS!!\n");
         polarity = 1;
         break;
     }
-    }
     return polarity;
 }
 
@@ -878,66 +860,48 @@ static int MPBIOS_trigger(int idx)
     switch ((mp_irqs[idx].mpc_irqflag>>2) & 3)
     {
     case 0: /* conforms, ie. bus-type dependent */
-    {
         switch (mp_bus_id_to_type[bus])
         {
         case MP_BUS_ISA: /* ISA pin */
-        {
             trigger = default_ISA_trigger(idx);
             break;
-        }
+
         case MP_BUS_EISA: /* EISA pin */
-        {
             trigger = default_EISA_trigger(idx);
             break;
-        }
+
         case MP_BUS_PCI: /* PCI pin */
-        {
             trigger = default_PCI_trigger(idx);
             break;
-        }
+
         case MP_BUS_MCA: /* MCA pin */
-        {
             trigger = default_MCA_trigger(idx);
             break;
-        }
+
         case MP_BUS_NEC98: /* NEC 98 pin */
-        {
             trigger = default_NEC98_trigger(idx);
             break;
-        }
+
         default:
-        {
             printk(KERN_WARNING "broken BIOS!!\n");
             trigger = 1;
             break;
         }
-        }
         break;
-    }
+
     case 1: /* edge */
-    {
         trigger = 0;
         break;
-    }
-    case 2: /* reserved */
-    {
-        printk(KERN_WARNING "broken BIOS!!\n");
-        trigger = 1;
-        break;
-    }
+
     case 3: /* level */
-    {
         trigger = 1;
         break;
-    }
-    default: /* invalid */
-    {
+
+    default: /* reserved */
         printk(KERN_WARNING "broken BIOS!!\n");
         trigger = 0;
         break;
     }
-    }
     return trigger;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:01:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:01:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404651.1638334 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMv-0007gj-1J; Tue, 01 Sep 2026 09:01:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404651.1638334; Tue, 01 Sep 2026 09:01:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KMu-0007gb-Uu; Tue, 01 Sep 2026 09:01:24 +0000
Received: by outflank-mailman (input) for mailman id 1404651;
 Tue, 01 Sep 2026 09:01:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KMt-0007gR-LB
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:01:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMt-0008oT-2q
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KMt-005BUF-1u
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=FGqW0+ICL5g84VoFhS5GrHa5X4h2pl0lKGOuuCGFSU8=; b=3f/2LdL0UpQx1NhiiF0VDKnlNA
	Kfq0A8UoJq5lCzAF+0JbaxNMxg8H/uEvVLJ6CtkYqFwPRyTN2GDI+eeuewktUDHStkUrnNY3SvQpE
	tc5XIHjw5DSiLuEndzDFKRFAtmXHwPTPEyRkt8YLCm4JBi3nSQ6wfuAoI4LnbCm+th5w=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] altp2m: address Misra 2.1 rule violation
Message-Id: <E1x1KMt-005BUF-1u@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:01:23 +0000

commit f35d7e08ced6dab2ceef467abdb5e823f445d77a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:59:12 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:59:12 2026 +0200

    altp2m: address Misra 2.1 rule violation
    
    The stub altp2m_vcpu_idx() is recognized as "noreturn" function lacking
    respective annotation (or having a return statement), which hence is deemed
    unreachable code by Misra / Eclair. All call sites are guarded by
    altp2m_active() checks, hence an inline function isn't needed. A
    declaration will suffice, with call sites then getting DCE-d.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/include/asm-generic/altp2m.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/include/asm-generic/altp2m.h b/xen/include/asm-generic/altp2m.h
index 39865a842a..58247c4a8b 100644
--- a/xen/include/asm-generic/altp2m.h
+++ b/xen/include/asm-generic/altp2m.h
@@ -14,13 +14,8 @@ static inline bool altp2m_active(const struct domain *d)
     return false;
 }
 
-/* Alternate p2m VCPU */
-static inline unsigned int altp2m_vcpu_idx(const struct vcpu *v)
-{
-    /* Not implemented on GENERIC, should not be reached. */
-    BUG();
-    return 0;
-}
+/* Alternate p2m VCPU - placeholder on GENERIC */
+unsigned int altp2m_vcpu_idx(const struct vcpu *v);
 
 #endif /* __ASM_GENERIC_ALTP2M_H */
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:01:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:01:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404652.1638338 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KN5-0007ih-2l; Tue, 01 Sep 2026 09:01:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404652.1638338; Tue, 01 Sep 2026 09:01:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KN5-0007iZ-04; Tue, 01 Sep 2026 09:01:35 +0000
Received: by outflank-mailman (input) for mailman id 1404652;
 Tue, 01 Sep 2026 09:01:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KN3-0007iR-Oa
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:01:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KN3-0008oY-3C
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KN3-005Ehv-2E
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=3jIHhnCxeMNA32kSSMeba1KgyjX5oSTYxb4pu/BlH0w=; b=gYeu3eJMBwadIPhgLcbgI7B4Ye
	T7xA+uv7S3yDIloP6T6z2nLCDPWsUMIsEsav1wK3Dzzfr1TV3x9/NI9xSguGDqbHskfUyj1jvXwMJ
	ZThQqnlAjNYuTv3RLGT22FIhloOFqrf3uFRi3eZLFXGZqpxn2KFLH8BMK//tPi8wbBLk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm/GIC: add noreturn in a few more places
Message-Id: <E1x1KN3-005Ehv-2E@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:01:33 +0000

commit 6852334f84166245b861a9b995ab6c9b7b44f503
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 10:00:01 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:00:01 2026 +0200

    Arm/GIC: add noreturn in a few more places
    
    LPI related functions having just BUG() in them are disliked by Misra /
    Eclair, as long as they don't also have a noreturn attribute.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/gic-v2.c                 | 2 +-
 xen/arch/arm/include/asm/gic_v3_its.h | 2 +-
 xen/arch/arm/vgic-v2.c                | 7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index 43a379fdda..d05c574d88 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -1315,7 +1315,7 @@ static int __init gicv2_init(void)
     return 0;
 }
 
-static void gicv2_do_LPI(unsigned int lpi)
+static void noreturn gicv2_do_LPI(unsigned int lpi)
 {
     /* No LPIs in a GICv2 */
     BUG();
diff --git a/xen/arch/arm/include/asm/gic_v3_its.h b/xen/arch/arm/include/asm/gic_v3_its.h
index fc5a84892c..02c083f210 100644
--- a/xen/arch/arm/include/asm/gic_v3_its.h
+++ b/xen/arch/arm/include/asm/gic_v3_its.h
@@ -229,7 +229,7 @@ static inline unsigned int vgic_v3_its_count(const struct domain *d)
     return 0;
 }
 
-static inline void gicv3_do_LPI(unsigned int lpi)
+static inline void noreturn gicv3_do_LPI(unsigned int lpi)
 {
     /* We don't enable LPIs without an ITS. */
     BUG();
diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c
index 3fa8cdeeab..6328ce6f7e 100644
--- a/xen/arch/arm/vgic-v2.c
+++ b/xen/arch/arm/vgic-v2.c
@@ -718,14 +718,15 @@ static void vgic_v2_domain_free(struct domain *d)
     /* Nothing to be cleanup for this driver */
 }
 
-static struct pending_irq *vgic_v2_lpi_to_pending(struct domain *d,
-                                                  unsigned int vlpi)
+static struct pending_irq *noreturn vgic_v2_lpi_to_pending(struct domain *d,
+                                                           unsigned int vlpi)
 {
     /* Dummy function, no LPIs on a VGICv2. */
     BUG();
 }
 
-static int vgic_v2_lpi_get_priority(struct domain *d, unsigned int vlpi)
+static int noreturn vgic_v2_lpi_get_priority(struct domain *d,
+                                             unsigned int vlpi)
 {
     /* Dummy function, no LPIs on a VGICv2. */
     BUG();
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:01:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:01:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404653.1638341 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KNE-0007kj-3p; Tue, 01 Sep 2026 09:01:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404653.1638341; Tue, 01 Sep 2026 09:01:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KNE-0007kb-1K; Tue, 01 Sep 2026 09:01:44 +0000
Received: by outflank-mailman (input) for mailman id 1404653;
 Tue, 01 Sep 2026 09:01:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KND-0007kV-S0
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:01:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KNE-0008ou-0J
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KND-005H4i-2a
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+L8LDKd7KcP9jJuIOa0B/gm69oWPxkmxfYdrk1at1io=; b=4PZFSJ5i4vutqG32ytVTmlJpwH
	8rV9m7UOiS+Z+e337t0fv12rZgzcY6KsIXEpYRm5tEY519pJoBaK+95/8w4sJFNq7C2matsVDDKPZ
	XoBYxUHNtUl/qvjD5Rl2N0+eN3+3fusNp7oet1KC+yKD4IqGLZImxqhvViyB1+VOC4tk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Eclair: deviate BUILD_ERROR() wrt rule 2.1 and introduce variants
Message-Id: <E1x1KND-005H4i-2a@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:01:43 +0000

commit 13d1c89e045dcf55316b64d73384f49f67b1d367
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 10:00:34 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:00:34 2026 +0200

    Eclair: deviate BUILD_ERROR() wrt rule 2.1 and introduce variants
    
    BUILD_ERROR() is even stronger a guard than assertions in general, and
    ASSERT_UNREACHABLE() (or BUG()) in particular. Deviate it just like those
    to allow use for marking unreachable portions of code.
    
    In some cases code being unreachable is dependent upon configuration.
    Introduce two variants, as constructs like
    
        if ( IS_ENABLED(CONFIG_...) )
            BUILD_ERROR("...");
    
    results in the if() still being reported as unreachable. Sadly these two
    new macros introduce a new 20.12 violation each, which hence also needs
    deviating.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl |  2 ++
 xen/include/xen/macros.h                         | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 7d4b6f2948..c087032293 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -19,6 +19,7 @@ Constant expressions and unreachable branches of if and switch statements are ex
 
 -doc_begin="Unreachability inside an ASSERT_UNREACHABLE() and analogous macro calls is deliberate and safe."
 -config=MC3A2.R2.1,reports+={deliberate, "any_area(any_loc(any_exp(macro(name(ASSERT_UNREACHABLE||PARSE_ERR_RET||PARSE_ERR||FAIL_MSR||FAIL_CPUID)))))"}
+-config=MC3A2.R2.1,reports+={deliberate, "any_area(any_loc(any_exp(macro(^BUILD_ERROR(|_IF(|_NOT))$))))"}
 -doc_end
 
 -doc_begin="The asm-offset files are not linked deliberately, since they are used to generate definitions for asm modules."
@@ -667,6 +668,7 @@ deliberate."
 to the # or ## operators within the following macros are deliberate, to provide
 useful diagnostic messages to the user."
 -config=MC3A2.R20.12,macros+={deliberate, "name(ASSERT||BUILD_BUG_ON||BUILD_BUG_ON_ZERO||RUNTIME_CHECK)"}
+-config=MC3A2.R20.12,macros+={deliberate, "^BUILD_ERROR(|_IF(|_NOT))$"}
 -doc_end
 
 -doc_begin="The helper macro GENERATE_CASE may use a macro parameter for ordinary
diff --git a/xen/include/xen/macros.h b/xen/include/xen/macros.h
index e29cff791e..b07bd5f530 100644
--- a/xen/include/xen/macros.h
+++ b/xen/include/xen/macros.h
@@ -64,6 +64,21 @@
  */
 #define BUILD_ERROR(msg) asm ( ".error \"" msg "\"" )
 
+/*
+ * Like above, but conditional upon @cfg (not) being enabled.  @cfg must be
+ * suitable to pass to IS_ENABLED().
+ */
+#define BUILD_ERROR_IF(cfg)                               \
+    (IS_ENABLED(cfg)                                      \
+     ? ({ BUILD_ERROR( #cfg " unexpectedly enabled"); })  \
+     : (void)0)
+
+#define BUILD_ERROR_IF_NOT(cfg)                           \
+    (!IS_ENABLED(cfg)                                     \
+     ? ({ BUILD_ERROR( #cfg " unexpectedly disabled"); }) \
+     : (void)0)
+
+
 /* Hide a value from the optimiser. */
 #define HIDE(x)                                 \
     ({                                          \
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:01:55 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:01:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404654.1638346 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KNP-0007mm-5N; Tue, 01 Sep 2026 09:01:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404654.1638346; Tue, 01 Sep 2026 09:01:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KNP-0007mc-2n; Tue, 01 Sep 2026 09:01:55 +0000
Received: by outflank-mailman (input) for mailman id 1404654;
 Tue, 01 Sep 2026 09:01:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KNN-0007mU-Uv
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:01:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KNO-0008p1-0b
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KNN-005JKR-2v
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:01:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=wzpQBbH4QXfs2HH20crnJ5DcAlJE6VpRDdRJWs+SH28=; b=kZI8P+TQ8MX2qqXkqMcoB2sZXl
	jZeI72gGD2RTvUxAcx/xG4jPca/Gqug5i8anQY1gBjuPi69C0WpGBYq5USnUdSJgVyh7pnwiZrlcv
	DyA14eikX6k/sXvWbH0ZhxwYgXxzyeLJgq2FyXXKeVBkKF/KbVeJSxFIu7CvW2Vsabcc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] PCI/physdev: address Misra 2.1 rule violation
Message-Id: <E1x1KNN-005JKR-2v@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:01:53 +0000

commit 2b434157fb69ed6fb617af763e0d89718461c5c8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 10:00:48 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:00:48 2026 +0200

    PCI/physdev: address Misra 2.1 rule violation
    
    Cases 0..3 are handled, and a 2-bit mask is applied to the switch()
    expression. Therefore the default: case is reported unreachable by Eclair.
    Insert BUILD_ERROR() to annotate this for Eclair.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/drivers/pci/physdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/pci/physdev.c b/xen/drivers/pci/physdev.c
index d46501b884..5695c300f7 100644
--- a/xen/drivers/pci/physdev.c
+++ b/xen/drivers/pci/physdev.c
@@ -114,7 +114,7 @@ ret_t pci_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             break;
 
         default:
-            ret = -EINVAL;
+            BUILD_ERROR("PCI_DEVICE_RESET_* inconsistency");
             break;
         }
         write_unlock(&pdev->domain->pci_lock);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:02:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:02:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404655.1638349 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KNZ-0007pE-8E; Tue, 01 Sep 2026 09:02:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404655.1638349; Tue, 01 Sep 2026 09:02:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1KNZ-0007p5-5R; Tue, 01 Sep 2026 09:02:05 +0000
Received: by outflank-mailman (input) for mailman id 1404655;
 Tue, 01 Sep 2026 09:02:04 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1KNY-0007oz-4Y
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:02:04 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KNY-0008pI-1C
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:02:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1KNY-005LUk-0A
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:02:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MNjyzrlt/Ip7dsSQuTdA9OvFUriwLW1Y9qFFC6SbVWE=; b=4Fo9251P+duhVDJxuRcI2u9LnL
	Q+t3Siqw+kGXewhvlFfaiv06/Q6tdyMPxqWfNbLF3WiOrbp0hEIs0UbAPvSbj56qbMORmptdO6s4g
	c3R6zWEZdVf63FOCRswouc5IYHs8tzFXalCAB94gEiOTKVAIdkSFP27ndvGpHjDTTzTU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x1KNY-005LUk-0A@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:02:04 +0000

commit 2565341135f88081535f6830a6256277e2834403
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Tue Sep 1 10:02:13 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:02:13 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index d3a0a97e1d..c83bf7fea5 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -589,7 +589,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -869,8 +869,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:55:08 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:55:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404673.1638363 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LCp-00009s-Vx; Tue, 01 Sep 2026 09:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404673.1638363; Tue, 01 Sep 2026 09:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LCp-00009k-TR; Tue, 01 Sep 2026 09:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1404673;
 Tue, 01 Sep 2026 09:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LCo-00009e-Fj
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LCo-0009mK-1m
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LCo-00HZ8r-0m
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=EonUYR52XJi/WcPg9cDKl0eNK9h8R/W9hg0uQW5Gb0A=; b=4a7Y6ON7j3db02Q7gDZz6nGnlo
	94Vbq/0ljd6uBq9cMfVOYuBuGMPPHMgyvo03LodiQ9HHIyRJuqlyU97MjUG6rEVQjFmXzAuYQZ/Mr
	3PHjrphHtUegeG79QuLw+2EiwroMjCj6YEWc7A8uYcVnKf2dffSV0lKwLtUAkfCSmerg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] XSM: make xsm_default_action() const-correct
Message-Id: <E1x1LCo-00HZ8r-0m@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:55:02 +0000

commit c0308bdfb7c85c72d7242db4d179de205ca6d365
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:52:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:52:45 2026 +0200

    XSM: make xsm_default_action() const-correct
    
    To be able to properly use const on dummy hook function parameters, add
    const to both domain pointers.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/include/xsm/dummy.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 7af5cbdfb7..ffb5ae7831 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -76,7 +76,7 @@ void __xsm_action_mismatch_detected(void);
 #endif /* CONFIG_XSM */
 
 static always_inline int xsm_default_action(
-    xsm_default_t action, struct domain *src, struct domain *target)
+    xsm_default_t action, const struct domain *src, const struct domain *target)
 {
     switch ( action ) {
     case XSM_HOOK:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404674.1638367 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LCz-0000Bk-1K; Tue, 01 Sep 2026 09:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404674.1638367; Tue, 01 Sep 2026 09:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LCy-0000Bb-Ul; Tue, 01 Sep 2026 09:55:12 +0000
Received: by outflank-mailman (input) for mailman id 1404674;
 Tue, 01 Sep 2026 09:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LCy-0000BT-EP
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LCy-0009mO-2B
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LCy-0000SK-1B
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nqoBkpjC45mmgsBS3z2w1ufNJso4XCKx9CZ+KF2Ajl4=; b=q5IKcMRbDDrKK2qZipUBDeEBq3
	IlalsYzc2ANNnfQcHjBPYzhgkPHC1YKf1HEQS1KatL+/s1SmbhuggtXn3Mqreh6D0tcBiKwPkUjXb
	9cHkIkoGIVq/6HgWg8onGJMuNoafm7YQGjQY8WlOBy476p63Nh5u72UNBkJ6ryGLdjag=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] XSM: convert "allow" (Flask: "access") parameters to bool
Message-Id: <E1x1LCy-0000SK-1B@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:55:12 +0000

commit 8eb26a701bf5b6c9493c09f4f96299604cb870e7
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:53:40 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:53:40 2026 +0200

    XSM: convert "allow" (Flask: "access") parameters to bool
    
    These are boolean, so they should always have used bool (originally
    bool_t), not uint8_t. Leverage recent changes to arrange for this with
    (now) fewer places which need changing (within the XSM machinery itself).
    Adjust call sites as well, where the conversion wasn't done so far.
    
    While doing this, rename flask_io{port,mem}_mapping()'s last parameters to
    "map".
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/arch/x86/domctl.c          |  7 ++++---
 xen/arch/x86/pci.c             |  2 +-
 xen/arch/x86/pv/emul-priv-op.c |  2 +-
 xen/include/xsm/dummy.h        | 14 +++++++-------
 xen/include/xsm/hooks.h        | 14 +++++++-------
 xen/xsm/flask/hooks.c          | 19 ++++++++++---------
 6 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 6e42fa383c..51d62617bb 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -235,7 +235,7 @@ long arch_do_domctl(
     {
         unsigned int fp = domctl->u.ioport_permission.first_port;
         unsigned int np = domctl->u.ioport_permission.nr_ports;
-        int allow = domctl->u.ioport_permission.allow_access;
+        bool allow = domctl->u.ioport_permission.allow_access;
 
         ret = -EINVAL;
         if ( (fp + np) <= fp || (fp + np) > MAX_IOPORTS )
@@ -306,7 +306,8 @@ long arch_do_domctl(
             break;
         }
 
-        ret = xsm_irq_permission(XSM_PRIV, d, irq, flags);
+        ret = xsm_irq_permission(XSM_PRIV, d, irq,
+                                 flags & XEN_DOMCTL_GSI_ACTION_MASK);
         if ( ret )
             break;
 
@@ -687,7 +688,7 @@ long arch_do_domctl(
         unsigned int fgp = domctl->u.ioport_mapping.first_gport;
         unsigned int fmp = domctl->u.ioport_mapping.first_mport;
         unsigned int np = domctl->u.ioport_mapping.nr_ports;
-        unsigned int add = domctl->u.ioport_mapping.add_mapping;
+        bool add = domctl->u.ioport_mapping.add_mapping;
         struct hvm_domain *hvm;
         struct g2m_ioport *g2m_ioport;
         int found = 0;
diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index fd0715fb6a..1aefeab663 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -78,7 +78,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 {
     struct pci_dev *pdev;
     int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
-                                       reg, reg + size - 1, 1);
+                                       reg, reg + size - 1, true);
 
     if ( rc < 0 )
         return rc;
diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index 7bebd2ccdc..dc21515e44 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -260,7 +260,7 @@ static bool pci_cfg_ok(struct domain *currd, unsigned int start,
 
     return !write ?
            xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
-                                     start, start + size - 1, 0) == 0 :
+                                     start, start + size - 1, false) == 0 :
            pci_conf_write_intercept(0, machine_bdf, start, size, write) >= 0;
 }
 
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index ffb5ae7831..a47e7c5bf2 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -505,21 +505,21 @@ static XSM_INLINE int xsm_unmap_domain_irq(
 }
 
 static XSM_INLINE int xsm_irq_permission(
-    XSM_DEFAULT_ARG struct domain *d, int pirq, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, int pirq, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
 
 static XSM_INLINE int xsm_iomem_permission(
-    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
 
 static XSM_INLINE int xsm_iomem_mapping(
-    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
     return xsm_default_action(action, current->domain, d);
@@ -527,7 +527,7 @@ static XSM_INLINE int xsm_iomem_mapping(
 
 #ifdef CONFIG_HAS_VPCI
 static XSM_INLINE int xsm_iomem_mapping_vpci(
-    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint64_t s, uint64_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
     return xsm_default_action(action, current->domain, d);
@@ -537,7 +537,7 @@ static XSM_INLINE int xsm_iomem_mapping_vpci(
 #ifdef CONFIG_HAS_PCI
 static XSM_INLINE int xsm_pci_config_permission(
     XSM_DEFAULT_ARG struct domain *d, uint32_t machine_bdf, uint16_t start,
-    uint16_t end, uint8_t access)
+    uint16_t end, bool access)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
     return xsm_default_action(action, current->domain, d);
@@ -709,14 +709,14 @@ static XSM_INLINE int xsm_priv_mapping(
 }
 
 static XSM_INLINE int xsm_ioport_permission(
-    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
     return xsm_default_action(action, current->domain, d);
 }
 
 static XSM_INLINE int xsm_ioport_mapping(
-    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, uint8_t allow)
+    XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, bool allow)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
     return xsm_default_action(action, current->domain, d);
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index 1e558bf710..ec109f87c1 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -77,12 +77,12 @@ XSM_HOOK(int, unmap_domain_irq, struct domain *, int, const void *)
 XSM_HOOK(int, bind_pt_irq, struct domain *, struct xen_domctl_bind_pt_irq *)
 XSM_HOOK(int, unbind_pt_irq, struct domain *, struct xen_domctl_bind_pt_irq *)
 
-XSM_HOOK(int, irq_permission, struct domain *, int, uint8_t)
-XSM_HOOK(int, iomem_permission, struct domain *, uint64_t, uint64_t, uint8_t)
+XSM_HOOK(int, irq_permission, struct domain *, int, bool)
+XSM_HOOK(int, iomem_permission, struct domain *, uint64_t, uint64_t, bool)
 
-XSM_HOOK(int, iomem_mapping, struct domain *, uint64_t, uint64_t, uint8_t)
+XSM_HOOK(int, iomem_mapping, struct domain *, uint64_t, uint64_t, bool)
 #ifdef CONFIG_HAS_VPCI
-XSM_HOOK(int, iomem_mapping_vpci, struct domain *, uint64_t, uint64_t, uint8_t)
+XSM_HOOK(int, iomem_mapping_vpci, struct domain *, uint64_t, uint64_t, bool)
 #endif
 
 #if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
@@ -97,7 +97,7 @@ XSM_HOOK(int, resource_setup_misc)
 XSM_HOOK(int, resource_setup_pci, uint32_t)
 XSM_HOOK(int, resource_setup_gsi, int)
 XSM_HOOK(int, pci_config_permission, struct domain *, uint32_t, uint16_t,
-                                     uint16_t, uint8_t)
+                                     uint16_t, bool)
 #endif
 
 #ifdef CONFIG_HYPFS
@@ -142,8 +142,8 @@ XSM_HOOK(int, mmuext_op, struct domain *, struct domain *)
 XSM_HOOK(int, update_va_mapping, struct domain *, struct domain *, l1_pgentry_t)
 #endif /* CONFIG_PV */
 XSM_HOOK(int, priv_mapping, struct domain *, struct domain *)
-XSM_HOOK(int, ioport_permission, struct domain *, uint32_t, uint32_t, uint8_t)
-XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, uint32_t, uint8_t)
+XSM_HOOK(int, ioport_permission, struct domain *, uint32_t, uint32_t, bool)
+XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, uint32_t, bool)
 XSM_HOOK(int, pmu_op, struct domain *, unsigned int)
 #endif /* CONFIG_X86 */
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 11a77f0e28..3c0f62f057 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -998,7 +998,7 @@ static int cf_check flask_sysctl(const struct xen_sysctl *op)
 }
 #endif /* CONFIG_SYSCTL */
 
-static inline uint32_t resource_to_perm(uint8_t access)
+static inline uint32_t resource_to_perm(bool access)
 {
     if ( access )
         return RESOURCE__ADD;
@@ -1166,7 +1166,7 @@ static int cf_check flask_unbind_pt_irq(
 }
 
 static int cf_check flask_irq_permission(
-    struct domain *d, int pirq, uint8_t access)
+    struct domain *d, int pirq, bool access)
 {
     /* the PIRQ number is not useful; real IRQ is checked during mapping */
     return current_has_perm(d, SECCLASS_RESOURCE, resource_to_perm(access));
@@ -1199,7 +1199,7 @@ static int cf_check _iomem_has_perm(
 }
 
 static int cf_check flask_iomem_permission(
-    struct domain *d, uint64_t start, uint64_t end, uint8_t access)
+    struct domain *d, uint64_t start, uint64_t end, bool access)
 {
     struct iomem_has_perm_data data;
     int rc;
@@ -1221,16 +1221,17 @@ static int cf_check flask_iomem_permission(
     return security_iterate_iomem_sids(start, end, _iomem_has_perm, &data);
 }
 
-static int cf_check flask_iomem_mapping(struct domain *d, uint64_t start, uint64_t end, uint8_t access)
+static int cf_check flask_iomem_mapping(
+    struct domain *d, uint64_t start, uint64_t end, bool map)
 {
-    return flask_iomem_permission(d, start, end, access);
+    return flask_iomem_permission(d, start, end, map);
 }
 #define flask_iomem_mapping_vpci flask_iomem_mapping
 
 #ifdef CONFIG_HAS_PCI
 static int cf_check flask_pci_config_permission(
     struct domain *d, uint32_t machine_bdf, uint16_t start, uint16_t end,
-    uint8_t access)
+    bool access)
 {
     uint32_t dsid, rsid;
     int rc = -EPERM;
@@ -1709,7 +1710,7 @@ static int cf_check _ioport_has_perm(
 }
 
 static int cf_check flask_ioport_permission(
-    struct domain *d, uint32_t start, uint32_t end, uint8_t access)
+    struct domain *d, uint32_t start, uint32_t end, bool access)
 {
     int rc;
     struct ioport_has_perm_data data;
@@ -1733,9 +1734,9 @@ static int cf_check flask_ioport_permission(
 }
 
 static int cf_check flask_ioport_mapping(
-    struct domain *d, uint32_t start, uint32_t end, uint8_t access)
+    struct domain *d, uint32_t start, uint32_t end, bool map)
 {
-    return flask_ioport_permission(d, start, end, access);
+    return flask_ioport_permission(d, start, end, map);
 }
 
 #ifdef CONFIG_MEM_SHARING
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:55:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:55:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404675.1638372 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDA-0000EB-3Z; Tue, 01 Sep 2026 09:55:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404675.1638372; Tue, 01 Sep 2026 09:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LD9-0000E2-WE; Tue, 01 Sep 2026 09:55:24 +0000
Received: by outflank-mailman (input) for mailman id 1404675;
 Tue, 01 Sep 2026 09:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LD8-0000Dk-If
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LD8-0009mV-2a
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LD8-0003LM-1c
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=A2ArI5ccO7mm+LVwGaokdQuL5ueHiXdjDuyed9io5MI=; b=xosGU967i81iXcjES6dCtUbfN/
	9/yrvEs/lbiyQz9j6ZKDJVsyAEwhJeZ1i1bmgez+z9y+dp5S6zRvr45xH/yYjj0EMkU94yk8l3Asi
	BspRBR7iV9vdqglEgA4Nls6YE26qoQ804hYawQjol7QTHnAUtP2S3YzJDIAl8FDEY7wU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] XSM: make Argo hooks well-formed ones
Message-Id: <E1x1LD8-0003LM-1c@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:55:22 +0000

commit 72aa7d65b6b5f23d1cf8f5e457f73aa55616c1ed
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:54:46 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:54:46 2026 +0200

    XSM: make Argo hooks well-formed ones
    
    For whatever reason they didn't have an xsm_default_t first argument (to
    cope with XSM=n mode), making it impossible to (easily) cover them in
    xsm/hooks.h.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/argo.c       | 21 +++++++++++----------
 xen/include/xsm/dummy.h | 21 +++++++++++++--------
 xen/include/xsm/hooks.h |  8 ++++++++
 xen/include/xsm/xsm.h   | 32 --------------------------------
 xen/xsm/dummy.c         |  7 -------
 xen/xsm/flask/hooks.c   |  7 -------
 6 files changed, 32 insertions(+), 64 deletions(-)

diff --git a/xen/common/argo.c b/xen/common/argo.c
index 3c38a51d09..42dd516a18 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -1341,7 +1341,7 @@ fill_ring_data(const struct domain *currd,
      * Don't supply information about rings that a guest is not
      * allowed to send to.
      */
-    ret = xsm_argo_send(currd, dst_d);
+    ret = xsm_argo_send(XSM_HOOK, currd, dst_d);
     if ( ret )
         goto out;
 
@@ -1666,8 +1666,9 @@ register_ring(struct domain *currd,
 
     if ( reg.partner_id == XEN_ARGO_DOMID_ANY )
     {
-        ret = opt_argo_mac_permissive ? xsm_argo_register_any_source(currd) :
-                                        -EPERM;
+        ret = opt_argo_mac_permissive
+              ? xsm_argo_register_any_source(XSM_HOOK, currd)
+              : -EPERM;
         if ( ret )
             return ret;
     }
@@ -1680,7 +1681,7 @@ register_ring(struct domain *currd,
             return -ESRCH;
         }
 
-        ret = xsm_argo_register_single_source(currd, dst_d);
+        ret = xsm_argo_register_single_source(XSM_HOOK, currd, dst_d);
         if ( ret )
             goto out;
 
@@ -2002,7 +2003,7 @@ sendv(struct domain *src_d, xen_argo_addr_t *src_addr,
     if ( !dst_d )
         return -ESRCH;
 
-    ret = xsm_argo_send(src_d, dst_d);
+    ret = xsm_argo_send(XSM_HOOK, src_d, dst_d);
     if ( ret )
     {
         gprintk(XENLOG_ERR, "argo: XSM REJECTED %i -> %i\n",
@@ -2100,7 +2101,7 @@ do_argo_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1,
     if ( unlikely(!opt_argo) )
         return -EOPNOTSUPP;
 
-    rc = xsm_argo_enable(currd);
+    rc = xsm_argo_enable(XSM_HOOK, currd);
     if ( rc )
         return rc;
 
@@ -2242,7 +2243,7 @@ compat_argo_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1,
     if ( unlikely(!opt_argo) )
         return -EOPNOTSUPP;
 
-    rc = xsm_argo_enable(currd);
+    rc = xsm_argo_enable(XSM_HOOK, currd);
     if ( rc )
         return rc;
 
@@ -2307,7 +2308,7 @@ argo_init(struct domain *d)
 {
     struct argo_domain *argo;
 
-    if ( !opt_argo || xsm_argo_enable(d) )
+    if ( !opt_argo || xsm_argo_enable(XSM_HOOK, d) )
     {
         argo_dprintk("argo disabled, domid: %u\n", d->domain_id);
         return 0;
@@ -2365,8 +2366,8 @@ argo_soft_reset(struct domain *d)
         wildcard_rings_pending_remove(d);
 
         /*
-         * Since neither opt_argo or xsm_argo_enable(d) can change at runtime,
-         * if d->argo is true then both opt_argo and xsm_argo_enable(d) must be
+         * Since neither opt_argo nor xsm_argo_enable() can change at runtime,
+         * if d->argo is true then both opt_argo and xsm_argo_enable() must be
          * true, and we can assume that init is allowed to proceed again here.
          */
         argo_domain_init(d->argo);
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index a47e7c5bf2..65df405dbf 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -749,27 +749,32 @@ static XSM_INLINE int xsm_dm_op(XSM_DEFAULT_ARG struct domain *d)
 #endif
 
 #ifdef CONFIG_ARGO
-static XSM_INLINE int xsm_argo_enable(const struct domain *d)
+
+static XSM_INLINE int xsm_argo_enable(XSM_DEFAULT_ARG const struct domain *d)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, NULL);
 }
 
 static XSM_INLINE int xsm_argo_register_single_source(
-    const struct domain *d, const struct domain *t)
+    XSM_DEFAULT_ARG const struct domain *d, const struct domain *t)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, t);
 }
 
 static XSM_INLINE int xsm_argo_register_any_source(
-    const struct domain *d)
+    XSM_DEFAULT_ARG const struct domain *d)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, NULL);
 }
 
 static XSM_INLINE int xsm_argo_send(
-    const struct domain *d, const struct domain *t)
+    XSM_DEFAULT_ARG const struct domain *d, const struct domain *t)
 {
-    return 0;
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, d, t);
 }
 
 #endif /* CONFIG_ARGO */
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index ec109f87c1..87cf6e5af6 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -159,6 +159,14 @@ XSM_HOOK(int, do_xsm_op, XEN_GUEST_HANDLE_PARAM(void))
 XSM_HOOK(int, do_compat_op, XEN_GUEST_HANDLE_PARAM(void))
 #endif
 
+#ifdef CONFIG_ARGO
+XSM_HOOK(int, argo_enable, const struct domain *)
+XSM_HOOK(int, argo_register_single_source, const struct domain *,
+                                           const struct domain *)
+XSM_HOOK(int, argo_register_any_source, const struct domain *)
+XSM_HOOK(int, argo_send, const struct domain *, const struct domain *)
+#endif
+
 #undef XSM_HOOK0
 #undef XSM_HOOK1
 #undef XSM_HOOK2
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index b94f0cd0fd..9809e005e0 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -85,14 +85,6 @@ struct xsm_ops {
     char *(*show_security_evtchn)(struct domain *d, const struct evtchn *chn);
 
     char *(*show_irq_sid)(int irq);
-
-#ifdef CONFIG_ARGO
-    int (*argo_enable)(const struct domain *d);
-    int (*argo_register_single_source)(const struct domain *d,
-                                       const struct domain *t);
-    int (*argo_register_any_source)(const struct domain *d);
-    int (*argo_send)(const struct domain *d, const struct domain *t);
-#endif
 };
 
 #ifdef CONFIG_XSM
@@ -196,30 +188,6 @@ static inline char *xsm_show_irq_sid(int irq)
     return alternative_call(xsm_ops.show_irq_sid, irq);
 }
 
-#ifdef CONFIG_ARGO
-static inline int xsm_argo_enable(const struct domain *d)
-{
-    return alternative_call(xsm_ops.argo_enable, d);
-}
-
-static inline int xsm_argo_register_single_source(
-    const struct domain *d, const struct domain *t)
-{
-    return alternative_call(xsm_ops.argo_register_single_source, d, t);
-}
-
-static inline int xsm_argo_register_any_source(const struct domain *d)
-{
-    return alternative_call(xsm_ops.argo_register_any_source, d);
-}
-
-static inline int xsm_argo_send(const struct domain *d, const struct domain *t)
-{
-    return alternative_call(xsm_ops.argo_send, d, t);
-}
-
-#endif /* CONFIG_ARGO */
-
 #endif /* XSM_NO_WRAPPERS */
 
 #ifdef CONFIG_MULTIBOOT
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 046c0cb59e..c61c5875b8 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -35,13 +35,6 @@ static const struct xsm_ops __initconst_cf_clobber dummy_ops = {
     .show_security_evtchn          = xsm_show_security_evtchn,
 
     .show_irq_sid                  = xsm_show_irq_sid,
-
-#ifdef CONFIG_ARGO
-    .argo_enable                   = xsm_argo_enable,
-    .argo_register_single_source   = xsm_argo_register_single_source,
-    .argo_register_any_source      = xsm_argo_register_any_source,
-    .argo_send                     = xsm_argo_send,
-#endif
 };
 
 void __init xsm_fixup_ops(struct xsm_ops *ops)
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 3c0f62f057..902857415b 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1969,13 +1969,6 @@ static const struct xsm_ops __initconst_cf_clobber flask_ops = {
     .show_security_evtchn = flask_show_security_evtchn,
 
     .show_irq_sid = flask_show_irq_sid,
-
-#ifdef CONFIG_ARGO
-    .argo_enable = flask_argo_enable,
-    .argo_register_single_source = flask_argo_register_single_source,
-    .argo_register_any_source = flask_argo_register_any_source,
-    .argo_send = flask_argo_send,
-#endif
 };
 
 const struct xsm_ops *__init flask_init(
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:55:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:55:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404676.1638375 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDK-0000Gr-5M; Tue, 01 Sep 2026 09:55:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404676.1638375; Tue, 01 Sep 2026 09:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDK-0000Gj-2l; Tue, 01 Sep 2026 09:55:34 +0000
Received: by outflank-mailman (input) for mailman id 1404676;
 Tue, 01 Sep 2026 09:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LDI-0000Gd-Lm
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDI-0009mZ-2u
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDI-0005kF-1x
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=3rh7Tgz08JKlzrajIwnxD1/O1AlPRLW8bi9utxHWrwU=; b=P6nRNinW1qXgjcLsSux+wU4Ntv
	7HSVmGHNAVux1/Fe4XU90qrTo02hfOhvqnOH+DpkQ6AvUAOXz8y6VWYrBrizuPyEnRFg11RHZCOWY
	Wm/+Cp1nuY1tajsTy4CePhOgUmIp/IWIC/55jJgiju2bWUgbxFuaxrqeVNUSq2fYn/uE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] RISC-V: place .sdata / .srodata / .riscv.attributes
Message-Id: <E1x1LDI-0005kF-1x@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:55:32 +0000

commit c01408981554e59ba4f6d0ac492f431e3aa313fa
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:55:13 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:55:13 2026 +0200

    RISC-V: place .sdata / .srodata / .riscv.attributes
    
    Of the short-data sections, only .sbss is presently mentioned in the
    linker script. Place them next to, but ahead of their "normal" data
    sections.
    
    .riscv.attributes can go towards the tail of the image, next to (ahead of)
    debug info.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/xen.lds.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
index 65f136dce9..70db658fef 100644
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -44,6 +44,8 @@ SECTIONS
 
         BUGFRAMES
 
+        *(.srodata)
+        *(.srodata.*)
         *(.rodata)
         *(.rodata.*)
         VPCI_ARRAY
@@ -92,6 +94,7 @@ SECTIONS
         SCHEDULER_ARRAY
         HYPFS_PARAM
 
+        *(.sdata .sdata.*)
         *(.data .data.*)
         CONSTRUCTORS
     } :text
@@ -162,6 +165,8 @@ SECTIONS
     /* Section for the device tree blob (if any). */
     .dtb : { *(.dtb) } :text
 
+    .riscv.attributes : { *(.riscv.attributes) }
+
     DWARF2_DEBUG_SECTIONS
 
     DISCARD_SECTIONS
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:55:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:55:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404677.1638379 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDU-0000Iv-6t; Tue, 01 Sep 2026 09:55:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404677.1638379; Tue, 01 Sep 2026 09:55:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDU-0000Im-47; Tue, 01 Sep 2026 09:55:44 +0000
Received: by outflank-mailman (input) for mailman id 1404677;
 Tue, 01 Sep 2026 09:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LDS-0000Ie-QB
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDT-0009mt-08
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDS-0008QE-2M
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sJd0ly1nAvOE/WxmB11SjParCy3g2e/ehOZVQg473vc=; b=WCuS9Y1FvxTpxXPOF/jPrueIDg
	FP+712Ijd49H7MgjdYjjs6eZRrMpkAorgqw3uJNZb3YgYTJ9jwG9cc0xs9fFNj6xk+HdAuS5i/Ed1
	v3sxDdRkiZ81wOhpodDT6rG9/AKD+4hmn+Ql90CHefd6Ehz4lj2em6BaO+nr01Pvhj3s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] flask: add const qualifier to security_context_to_sid()
Message-Id: <E1x1LDS-0008QE-2M@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:55:42 +0000

commit 95509915ea881f5a9b5e9138e5e9ce2bc19a033c
Author:     Sergiy Kibrik <Sergiy_Kibrik@epam.com>
AuthorDate: Tue Sep 1 09:55:47 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:55:47 2026 +0200

    flask: add const qualifier to security_context_to_sid()
    
    The function does not modify context argument.
    Also it gives more flexibility to this API usage, because some context strings
    in Xen are also const char*.
    
    While there,
    - harmonize last parameter's name,
    - u32 -> uint32_t.
    
    Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/xsm/flask/include/security.h | 3 ++-
 xen/xsm/flask/ss/services.c      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/xsm/flask/include/security.h b/xen/xsm/flask/include/security.h
index ec8b442a8f..a4823fbcc9 100644
--- a/xen/xsm/flask/include/security.h
+++ b/xen/xsm/flask/include/security.h
@@ -76,7 +76,8 @@ int security_change_sid(u32 ssid, u32 tsid, u16 tclass, u32 *out_sid);
 
 int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len);
 
-int security_context_to_sid(char *scontext, u32 scontext_len, u32 *out_sid);
+int security_context_to_sid(const char *scontext, uint32_t scontext_len,
+                            uint32_t *sid);
 
 int security_get_allow_unknown(void);
 
diff --git a/xen/xsm/flask/ss/services.c b/xen/xsm/flask/ss/services.c
index 35ad1034ca..57beaafa9f 100644
--- a/xen/xsm/flask/ss/services.c
+++ b/xen/xsm/flask/ss/services.c
@@ -813,7 +813,8 @@ out:
  * Returns -%EINVAL if the context is invalid, -%ENOMEM if insufficient
  * memory is available, or 0 on success.
  */
-int security_context_to_sid(char *scontext, u32 scontext_len, u32 *sid)
+int security_context_to_sid(
+    const char *scontext, uint32_t scontext_len, uint32_t *sid)
 {
     char *scontext2;
     struct context context;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:55:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:55:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404678.1638383 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDe-0000Kp-7x; Tue, 01 Sep 2026 09:55:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404678.1638383; Tue, 01 Sep 2026 09:55:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDe-0000Kh-5Q; Tue, 01 Sep 2026 09:55:54 +0000
Received: by outflank-mailman (input) for mailman id 1404678;
 Tue, 01 Sep 2026 09:55:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LDc-0000Kb-Tw
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:55:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDd-0009mx-0U
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDc-000Ab0-2l
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eBu5FY/VVutPT4K4WaBC+aiUCzoQuendnuGsfjQfKU0=; b=MkAomDesWhB4g0AHAU2Al/ABmd
	+BwBbsFbMDHpa9fP9YzButSEGE+z8BSojsNfbHduEAE04sr7JkbMrP+iee+eBjxLhdJJG44npiLQp
	gZEyxMdj/TPj99P6TgDz/GHPoiXxPXDtonmW+vt0Qo0u/zlU50oZV8wJu6hYbedgaogk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: drop pregs from struct cpu_user_regs
Message-Id: <E1x1LDc-000Ab0-2l@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:55:52 +0000

commit f3100b986e564b5ba39a7170b1d7a1ae2b7cdf07
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Tue Sep 1 09:57:13 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:57:13 2026 +0200

    xen/riscv: drop pregs from struct cpu_user_regs
    
    As nothing is using pregs in upstream or downstream ports of RISC-V drop
    it from struct cpu_user_regs. Once it will really be needed re-introduce
    it.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/processor.h | 2 --
 xen/arch/riscv/riscv64/asm-offsets.c   | 1 -
 2 files changed, 3 deletions(-)

diff --git a/xen/arch/riscv/include/asm/processor.h b/xen/arch/riscv/include/asm/processor.h
index 6b89df4a2d..b1745c1071 100644
--- a/xen/arch/riscv/include/asm/processor.h
+++ b/xen/arch/riscv/include/asm/processor.h
@@ -50,8 +50,6 @@ struct cpu_user_regs
     unsigned long sepc;
     unsigned long sstatus;
     unsigned long hstatus;
-    /* pointer to previous stack_cpu_regs */
-    unsigned long pregs;
 };
 
 /* TODO: need to implement */
diff --git a/xen/arch/riscv/riscv64/asm-offsets.c b/xen/arch/riscv/riscv64/asm-offsets.c
index 472cced4f8..1290b9dbbe 100644
--- a/xen/arch/riscv/riscv64/asm-offsets.c
+++ b/xen/arch/riscv/riscv64/asm-offsets.c
@@ -50,7 +50,6 @@ void asm_offsets(void)
     OFFSET(CPU_USER_REGS_SEPC, struct cpu_user_regs, sepc);
     OFFSET(CPU_USER_REGS_SSTATUS, struct cpu_user_regs, sstatus);
     OFFSET(CPU_USER_REGS_HSTATUS, struct cpu_user_regs, hstatus);
-    OFFSET(CPU_USER_REGS_PREGS, struct cpu_user_regs, pregs);
     BLANK();
     DEFINE(PCPU_INFO_SIZE, sizeof(struct pcpu_info));
     BLANK();
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:56:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:56:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404679.1638387 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDo-0000Mn-9m; Tue, 01 Sep 2026 09:56:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404679.1638387; Tue, 01 Sep 2026 09:56:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDo-0000Mf-6y; Tue, 01 Sep 2026 09:56:04 +0000
Received: by outflank-mailman (input) for mailman id 1404679;
 Tue, 01 Sep 2026 09:56:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LDn-0000MX-16
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:56:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDn-0009nE-0q
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDm-000C6B-37
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=BfaQptjQMd2dCuD/12lPpLcsXVRVeDlXVAnJ6c757jk=; b=f40VkTI89XChwhVz4FunlFSc8v
	dyMZkvaYPoTlIbk6lnWiU0h5xvvf9cUsqm8pL6MGlN/RFGykx1D7leDgFf4h1ChbrHDHiR/NyuGyn
	TdsbwAfoLJSQlzqmX8OvYk8Yti6BrxYh9aJMpK34beWgXU04evH3FZjvDcBTCFl+a2tE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: drop bug.h's duplicate instruction length helpers
Message-Id: <E1x1LDm-000C6B-37@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:56:02 +0000

commit 2822d55ea88b4bb0345cd918cfc5465d2791c9dd
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Tue Sep 1 09:57:58 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:57:58 2026 +0200

    xen/riscv: drop bug.h's duplicate instruction length helpers
    
    asm/riscv_encoding.h already provides INSN_16BIT_MASK and INSN_LEN(), and
    emulate.c uses them, so the tree carried two spellings of the same thing
    which could drift apart. COMPRESSED_INSN_MASK never had a user.
    
    No functional change.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/bug.h | 19 -------------------
 xen/arch/riscv/traps.c           |  2 +-
 2 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/xen/arch/riscv/include/asm/bug.h b/xen/arch/riscv/include/asm/bug.h
index e6f2868816..c2cdc2dc2a 100644
--- a/xen/arch/riscv/include/asm/bug.h
+++ b/xen/arch/riscv/include/asm/bug.h
@@ -13,25 +13,6 @@
 
 #define BUG_INSTR "unimp"
 
-/*
- * The base instruction set has a fixed length of 32-bit naturally aligned
- * instructions.
- *
- * There are extensions of variable length ( where each instruction can be
- * any number of 16-bit parcels in length ).
- *
- * Compressed ISA is used now where the instruction length is 16 bit and
- * 'unimp' instruction, in this case, can be either 16 or 32 bit (
- * depending on if compressed ISA is used or not )
- */
-#define INSN_LENGTH_MASK        _UL(0x3)
-#define INSN_LENGTH_32          _UL(0x3)
-
-#define COMPRESSED_INSN_MASK    _UL(0xffff)
-
-#define GET_INSN_LENGTH(insn)                               \
-    (((insn) & INSN_LENGTH_MASK) == INSN_LENGTH_32 ? 4 : 2) \
-
 #endif /* !__ASSEMBLER__ */
 
 #endif /* ASM__RISCV__BUG_H */
diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c
index d35c013e13..10d6855d91 100644
--- a/xen/arch/riscv/traps.c
+++ b/xen/arch/riscv/traps.c
@@ -214,7 +214,7 @@ void do_trap(struct cpu_user_regs *cpu_regs)
                 die();
             }
 
-            cpu_regs->sepc += GET_INSN_LENGTH(*(uint16_t *)pc);
+            cpu_regs->sepc += INSN_LEN(*(const uint16_t *)pc);
 
             break;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:56:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:56:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404680.1638391 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDy-0000P2-Ay; Tue, 01 Sep 2026 09:56:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404680.1638391; Tue, 01 Sep 2026 09:56:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LDy-0000Ou-8Q; Tue, 01 Sep 2026 09:56:14 +0000
Received: by outflank-mailman (input) for mailman id 1404680;
 Tue, 01 Sep 2026 09:56:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LDx-0000Oo-4c
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:56:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDx-0009nM-1C
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LDx-000DaL-0F
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ByqQaP6X3QkQ4nNbuqISxwmYPyLJpxY945dv9Xu3+Jw=; b=YKeQpWM0OLDtVWyykIH92GAssR
	EcThT6r4y6HGFPoGvxMPSJXSivzHwnWpKShD4ZKZ5t9CClzEb1XI8e2pnWcDHxTmGwU1CkfDtyGMV
	4cJX2sqZkUXiXsroi8v0hqxzfS3i3LAP0G++D1194ylZfvoUjX1AIYXGHLTSrP5NyLV8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/IO-APIC: address Misra 2.1 rule violations
Message-Id: <E1x1LDx-000DaL-0F@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:56:13 +0000

commit a1435a677c298c45e683add949587f6a060bf17f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:58:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:58:45 2026 +0200

    x86/IO-APIC: address Misra 2.1 rule violations
    
    In both functions cases 0..3 are handled, and a 2-bit mask is applied to
    the switch() expression. Therefore the default: cases are reported
    unreachable by Eclair. Subsume the "case 2" blocks each into the
    corresponding default ones.
    
    While there also drop all the pointless figure braces inside the various
    case blocks, inserting blank lines instead between them.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/io_apic.c | 72 +++++++++++++-------------------------------------
 1 file changed, 18 insertions(+), 54 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 8310314fbe..01cf8fc735 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -804,66 +804,48 @@ static int __init MPBIOS_polarity(int idx)
     switch (mp_irqs[idx].mpc_irqflag & 3)
     {
     case 0: /* conforms, ie. bus-type dependent polarity */
-    {
         switch (mp_bus_id_to_type[bus])
         {
         case MP_BUS_ISA: /* ISA pin */
-        {
             polarity = default_ISA_polarity(idx);
             break;
-        }
+
         case MP_BUS_EISA: /* EISA pin */
-        {
             polarity = default_EISA_polarity(idx);
             break;
-        }
+
         case MP_BUS_PCI: /* PCI pin */
-        {
             polarity = default_PCI_polarity(idx);
             break;
-        }
+
         case MP_BUS_MCA: /* MCA pin */
-        {
             polarity = default_MCA_polarity(idx);
             break;
-        }
+
         case MP_BUS_NEC98: /* NEC 98 pin */
-        {
             polarity = default_NEC98_polarity(idx);
             break;
-        }
+
         default:
-        {
             printk(KERN_WARNING "broken BIOS!!\n");
             polarity = 1;
             break;
         }
-        }
         break;
-    }
+
     case 1: /* high active */
-    {
         polarity = 0;
         break;
-    }
-    case 2: /* reserved */
-    {
-        printk(KERN_WARNING "broken BIOS!!\n");
-        polarity = 1;
-        break;
-    }
+
     case 3: /* low active */
-    {
         polarity = 1;
         break;
-    }
-    default: /* invalid */
-    {
+
+    default: /* reserved */
         printk(KERN_WARNING "broken BIOS!!\n");
         polarity = 1;
         break;
     }
-    }
     return polarity;
 }
 
@@ -878,66 +860,48 @@ static int MPBIOS_trigger(int idx)
     switch ((mp_irqs[idx].mpc_irqflag>>2) & 3)
     {
     case 0: /* conforms, ie. bus-type dependent */
-    {
         switch (mp_bus_id_to_type[bus])
         {
         case MP_BUS_ISA: /* ISA pin */
-        {
             trigger = default_ISA_trigger(idx);
             break;
-        }
+
         case MP_BUS_EISA: /* EISA pin */
-        {
             trigger = default_EISA_trigger(idx);
             break;
-        }
+
         case MP_BUS_PCI: /* PCI pin */
-        {
             trigger = default_PCI_trigger(idx);
             break;
-        }
+
         case MP_BUS_MCA: /* MCA pin */
-        {
             trigger = default_MCA_trigger(idx);
             break;
-        }
+
         case MP_BUS_NEC98: /* NEC 98 pin */
-        {
             trigger = default_NEC98_trigger(idx);
             break;
-        }
+
         default:
-        {
             printk(KERN_WARNING "broken BIOS!!\n");
             trigger = 1;
             break;
         }
-        }
         break;
-    }
+
     case 1: /* edge */
-    {
         trigger = 0;
         break;
-    }
-    case 2: /* reserved */
-    {
-        printk(KERN_WARNING "broken BIOS!!\n");
-        trigger = 1;
-        break;
-    }
+
     case 3: /* level */
-    {
         trigger = 1;
         break;
-    }
-    default: /* invalid */
-    {
+
+    default: /* reserved */
         printk(KERN_WARNING "broken BIOS!!\n");
         trigger = 0;
         break;
     }
-    }
     return trigger;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:56:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:56:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404681.1638395 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LE8-0000RZ-Ck; Tue, 01 Sep 2026 09:56:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404681.1638395; Tue, 01 Sep 2026 09:56:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LE8-0000RP-9t; Tue, 01 Sep 2026 09:56:24 +0000
Received: by outflank-mailman (input) for mailman id 1404681;
 Tue, 01 Sep 2026 09:56:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LE7-0000R2-7y
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:56:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LE7-0009nQ-1X
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LE7-000EyO-0a
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=6v6lW0SN2yyi1IYR9zMVJVMDTLeQL4zOHfox+XSjOTE=; b=f1qnRwmy0WJ096ev2pLFKP5yuj
	Oe3U+XD+Qk11IpTxs1t0JSjDQIuyJ5lv05l3x7H2w3a2ZCdEJs/Zg7AiRjqelyRxLHPiaA5pt4Wv2
	qzebjNOvLfqQbUgjyYMsg21KJEDDfHFXG+9Xwo6c7C/FeEZrmQ22p6TN384Rv4WeWD+I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] altp2m: address Misra 2.1 rule violation
Message-Id: <E1x1LE7-000EyO-0a@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:56:23 +0000

commit f35d7e08ced6dab2ceef467abdb5e823f445d77a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 09:59:12 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 09:59:12 2026 +0200

    altp2m: address Misra 2.1 rule violation
    
    The stub altp2m_vcpu_idx() is recognized as "noreturn" function lacking
    respective annotation (or having a return statement), which hence is deemed
    unreachable code by Misra / Eclair. All call sites are guarded by
    altp2m_active() checks, hence an inline function isn't needed. A
    declaration will suffice, with call sites then getting DCE-d.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/include/asm-generic/altp2m.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/include/asm-generic/altp2m.h b/xen/include/asm-generic/altp2m.h
index 39865a842a..58247c4a8b 100644
--- a/xen/include/asm-generic/altp2m.h
+++ b/xen/include/asm-generic/altp2m.h
@@ -14,13 +14,8 @@ static inline bool altp2m_active(const struct domain *d)
     return false;
 }
 
-/* Alternate p2m VCPU */
-static inline unsigned int altp2m_vcpu_idx(const struct vcpu *v)
-{
-    /* Not implemented on GENERIC, should not be reached. */
-    BUG();
-    return 0;
-}
+/* Alternate p2m VCPU - placeholder on GENERIC */
+unsigned int altp2m_vcpu_idx(const struct vcpu *v);
 
 #endif /* __ASM_GENERIC_ALTP2M_H */
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:56:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:56:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404682.1638398 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LEI-0000TQ-Du; Tue, 01 Sep 2026 09:56:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404682.1638398; Tue, 01 Sep 2026 09:56:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LEI-0000TJ-BF; Tue, 01 Sep 2026 09:56:34 +0000
Received: by outflank-mailman (input) for mailman id 1404682;
 Tue, 01 Sep 2026 09:56:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LEH-0000TD-BH
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:56:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LEH-0009nV-1r
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LEH-000GOy-0v
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=S0SmqlrXdjP4Len0wwGF3zEfEzSnslyb8GrUVrbVECI=; b=7OVU4435xLUGjA20BOiCfLOzbH
	7dbLa0U+SRAPH+ShFPwyKRQQt1NK4aGD/q6uPJcDYzEo0/zAo2gf4MfpxKHAitQVxsVN3R/DdSdD0
	R1moJhn67un1qaqZeeoW5bLksLDRz0PuShfkb98/PXqHAC5mR66Lw6urUvIskdUHsFeU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm/GIC: add noreturn in a few more places
Message-Id: <E1x1LEH-000GOy-0v@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:56:33 +0000

commit 6852334f84166245b861a9b995ab6c9b7b44f503
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 10:00:01 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:00:01 2026 +0200

    Arm/GIC: add noreturn in a few more places
    
    LPI related functions having just BUG() in them are disliked by Misra /
    Eclair, as long as they don't also have a noreturn attribute.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/gic-v2.c                 | 2 +-
 xen/arch/arm/include/asm/gic_v3_its.h | 2 +-
 xen/arch/arm/vgic-v2.c                | 7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index 43a379fdda..d05c574d88 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -1315,7 +1315,7 @@ static int __init gicv2_init(void)
     return 0;
 }
 
-static void gicv2_do_LPI(unsigned int lpi)
+static void noreturn gicv2_do_LPI(unsigned int lpi)
 {
     /* No LPIs in a GICv2 */
     BUG();
diff --git a/xen/arch/arm/include/asm/gic_v3_its.h b/xen/arch/arm/include/asm/gic_v3_its.h
index fc5a84892c..02c083f210 100644
--- a/xen/arch/arm/include/asm/gic_v3_its.h
+++ b/xen/arch/arm/include/asm/gic_v3_its.h
@@ -229,7 +229,7 @@ static inline unsigned int vgic_v3_its_count(const struct domain *d)
     return 0;
 }
 
-static inline void gicv3_do_LPI(unsigned int lpi)
+static inline void noreturn gicv3_do_LPI(unsigned int lpi)
 {
     /* We don't enable LPIs without an ITS. */
     BUG();
diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c
index 3fa8cdeeab..6328ce6f7e 100644
--- a/xen/arch/arm/vgic-v2.c
+++ b/xen/arch/arm/vgic-v2.c
@@ -718,14 +718,15 @@ static void vgic_v2_domain_free(struct domain *d)
     /* Nothing to be cleanup for this driver */
 }
 
-static struct pending_irq *vgic_v2_lpi_to_pending(struct domain *d,
-                                                  unsigned int vlpi)
+static struct pending_irq *noreturn vgic_v2_lpi_to_pending(struct domain *d,
+                                                           unsigned int vlpi)
 {
     /* Dummy function, no LPIs on a VGICv2. */
     BUG();
 }
 
-static int vgic_v2_lpi_get_priority(struct domain *d, unsigned int vlpi)
+static int noreturn vgic_v2_lpi_get_priority(struct domain *d,
+                                             unsigned int vlpi)
 {
     /* Dummy function, no LPIs on a VGICv2. */
     BUG();
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:56:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:56:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404683.1638403 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LES-0000W2-Gh; Tue, 01 Sep 2026 09:56:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404683.1638403; Tue, 01 Sep 2026 09:56:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LES-0000Vu-E8; Tue, 01 Sep 2026 09:56:44 +0000
Received: by outflank-mailman (input) for mailman id 1404683;
 Tue, 01 Sep 2026 09:56:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LER-0000Vm-Eq
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:56:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LER-0009nu-2E
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LER-000IQT-1G
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=NO4NiHBuOOLka4x/Be3zneaHDWknxxr7TjcTheJBQt0=; b=Vv/C/bbVlzmELSc5KpUmGEnbm0
	sg/+ADr7oNiJr0KuMtZfJgfpBgMa3XNJa6x1DjF6flcsWYYlamFF0vuzB9AKUBw8Pt3f5plhbI49p
	hEhPVazs0KcH3ho2LEPdxkAZ49lJ5wBP8DFvfXxUjrysnDi0docAkUiqCRqqGsLgIzV4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Eclair: deviate BUILD_ERROR() wrt rule 2.1 and introduce variants
Message-Id: <E1x1LER-000IQT-1G@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:56:43 +0000

commit 13d1c89e045dcf55316b64d73384f49f67b1d367
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 10:00:34 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:00:34 2026 +0200

    Eclair: deviate BUILD_ERROR() wrt rule 2.1 and introduce variants
    
    BUILD_ERROR() is even stronger a guard than assertions in general, and
    ASSERT_UNREACHABLE() (or BUG()) in particular. Deviate it just like those
    to allow use for marking unreachable portions of code.
    
    In some cases code being unreachable is dependent upon configuration.
    Introduce two variants, as constructs like
    
        if ( IS_ENABLED(CONFIG_...) )
            BUILD_ERROR("...");
    
    results in the if() still being reported as unreachable. Sadly these two
    new macros introduce a new 20.12 violation each, which hence also needs
    deviating.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl |  2 ++
 xen/include/xen/macros.h                         | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 7d4b6f2948..c087032293 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -19,6 +19,7 @@ Constant expressions and unreachable branches of if and switch statements are ex
 
 -doc_begin="Unreachability inside an ASSERT_UNREACHABLE() and analogous macro calls is deliberate and safe."
 -config=MC3A2.R2.1,reports+={deliberate, "any_area(any_loc(any_exp(macro(name(ASSERT_UNREACHABLE||PARSE_ERR_RET||PARSE_ERR||FAIL_MSR||FAIL_CPUID)))))"}
+-config=MC3A2.R2.1,reports+={deliberate, "any_area(any_loc(any_exp(macro(^BUILD_ERROR(|_IF(|_NOT))$))))"}
 -doc_end
 
 -doc_begin="The asm-offset files are not linked deliberately, since they are used to generate definitions for asm modules."
@@ -667,6 +668,7 @@ deliberate."
 to the # or ## operators within the following macros are deliberate, to provide
 useful diagnostic messages to the user."
 -config=MC3A2.R20.12,macros+={deliberate, "name(ASSERT||BUILD_BUG_ON||BUILD_BUG_ON_ZERO||RUNTIME_CHECK)"}
+-config=MC3A2.R20.12,macros+={deliberate, "^BUILD_ERROR(|_IF(|_NOT))$"}
 -doc_end
 
 -doc_begin="The helper macro GENERATE_CASE may use a macro parameter for ordinary
diff --git a/xen/include/xen/macros.h b/xen/include/xen/macros.h
index e29cff791e..b07bd5f530 100644
--- a/xen/include/xen/macros.h
+++ b/xen/include/xen/macros.h
@@ -64,6 +64,21 @@
  */
 #define BUILD_ERROR(msg) asm ( ".error \"" msg "\"" )
 
+/*
+ * Like above, but conditional upon @cfg (not) being enabled.  @cfg must be
+ * suitable to pass to IS_ENABLED().
+ */
+#define BUILD_ERROR_IF(cfg)                               \
+    (IS_ENABLED(cfg)                                      \
+     ? ({ BUILD_ERROR( #cfg " unexpectedly enabled"); })  \
+     : (void)0)
+
+#define BUILD_ERROR_IF_NOT(cfg)                           \
+    (!IS_ENABLED(cfg)                                     \
+     ? ({ BUILD_ERROR( #cfg " unexpectedly disabled"); }) \
+     : (void)0)
+
+
 /* Hide a value from the optimiser. */
 #define HIDE(x)                                 \
     ({                                          \
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:56:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:56:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404684.1638407 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LEc-0000Xx-Hw; Tue, 01 Sep 2026 09:56:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404684.1638407; Tue, 01 Sep 2026 09:56:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LEc-0000Xp-FQ; Tue, 01 Sep 2026 09:56:54 +0000
Received: by outflank-mailman (input) for mailman id 1404684;
 Tue, 01 Sep 2026 09:56:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LEb-0000Xj-I7
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:56:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LEb-0009o1-2Y
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LEb-000KOA-1a
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:56:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=rXdbNFKY0lA8Q7+qpzqW11srmdQgu/wklr9kDPjZnOg=; b=ubjgIBhYgONesNi7l8+qIr/B6i
	9MHnSrWte0bqec56Q7vx8SynrPsorTLqPtdHdKg6HzalH5kYcZla9/loW8hkLQ2MjXkezMpQwhkTI
	AZNEwfSYrifI1iJfS9l2+Rb/bZVI4dGHk3ROvkBsOsn7uZ9v34HBsc+7z1erEFO2Mli8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] PCI/physdev: address Misra 2.1 rule violation
Message-Id: <E1x1LEb-000KOA-1a@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:56:53 +0000

commit 2b434157fb69ed6fb617af763e0d89718461c5c8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 1 10:00:48 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:00:48 2026 +0200

    PCI/physdev: address Misra 2.1 rule violation
    
    Cases 0..3 are handled, and a 2-bit mask is applied to the switch()
    expression. Therefore the default: case is reported unreachable by Eclair.
    Insert BUILD_ERROR() to annotate this for Eclair.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/drivers/pci/physdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/pci/physdev.c b/xen/drivers/pci/physdev.c
index d46501b884..5695c300f7 100644
--- a/xen/drivers/pci/physdev.c
+++ b/xen/drivers/pci/physdev.c
@@ -114,7 +114,7 @@ ret_t pci_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             break;
 
         default:
-            ret = -EINVAL;
+            BUILD_ERROR("PCI_DEVICE_RESET_* inconsistency");
             break;
         }
         write_unlock(&pdev->domain->pci_lock);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 09:57:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 09:57:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404685.1638410 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LEm-0000Zz-JL; Tue, 01 Sep 2026 09:57:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404685.1638410; Tue, 01 Sep 2026 09:57:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1LEm-0000Zr-Gn; Tue, 01 Sep 2026 09:57:04 +0000
Received: by outflank-mailman (input) for mailman id 1404685;
 Tue, 01 Sep 2026 09:57:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1LEl-0000Zj-M7
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 09:57:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LEl-0009oI-2w
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:57:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1LEl-000NAh-1y
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 09:57:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Npzl+8rviUIwJHWyRUTWpkuGQhuocsDP0vpRp0Vqn70=; b=OpO8gqjiFHQhSYio4u+Tmg6cjk
	49m0mO4trU/f2wGOdvNA0Eqf4UiHD4wxNwb5rQgQXoaAz1nV7cp3qx16SFeJG29RZ8dAVn/3JJI5m
	Sk+6wcMjwkpQzZf8O8so2V1JjSrls4o27NScCV0BAjxQZOxtayAXGSKR+vAnN9Lig7PY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x1LEl-000NAh-1y@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 09:57:03 +0000

commit 2565341135f88081535f6830a6256277e2834403
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Tue Sep 1 10:02:13 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 1 10:02:13 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index d3a0a97e1d..c83bf7fea5 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -589,7 +589,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -869,8 +869,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 21:44:11 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 21:44:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404986.1638535 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1WGx-0005Yu-Qo; Tue, 01 Sep 2026 21:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404986.1638535; Tue, 01 Sep 2026 21:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1WGx-0005Yl-O6; Tue, 01 Sep 2026 21:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1404986;
 Tue, 01 Sep 2026 21:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1WGw-0005Yf-5E
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 21:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1WGw-000Nl2-0S
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 21:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1WGv-00AxnW-2i
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 21:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=lxVK9L7UEPYP3ci5LK76OPg1kBr4py7zRUgqJQ4HsiE=; b=i57CW0HtdPi8/KEhtfDRcfZsU1
	JnXdNO1lUFb5cB6sTNKRLdzrlwDusc+S3RwKUsdOu96uY5ZGVoezhlC4ROBa0ac86EptExOuarY7A
	K24RBLiCJiGTNS4PJnbG76SAcPMBqECvgeYdPKbCRn0RbTAz+xyXjHheXb5q6VUJwc0s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/argo: Command line handling improvements
Message-Id: <E1x1WGv-00AxnW-2i@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 21:44:01 +0000

commit a4049dd6acf4527bb684a066510c1cf34292d5e1
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue May 20 15:03:45 2025 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    xen/argo: Command line handling improvements
    
    Treat "argo" on the command line as a positive boolean, rather than requiring
    the user to pass "argo=1/on/enable/true".
    
    Move both opt_argo* variables into __ro_after_init.  They're set during
    command line parsing and never modified thereafter.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/argo.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/argo.c b/xen/common/argo.c
index 42dd516a18..0b9a54db36 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -80,8 +80,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_argo_unregister_ring_t);
 DEFINE_COMPAT_HANDLE(compat_argo_iov_t);
 #endif
 
-static bool __read_mostly opt_argo;
-static bool __read_mostly opt_argo_mac_permissive;
+static bool __ro_after_init opt_argo;
+static bool __ro_after_init opt_argo_mac_permissive;
 
 static int __init cf_check parse_argo(const char *s)
 {
@@ -93,7 +93,10 @@ static int __init cf_check parse_argo(const char *s)
         if ( !ss )
             ss = strchr(s, '\0');
 
-        if ( (val = parse_bool(s, ss)) >= 0 )
+        /* Intepret "argo" as a positive boolean. */
+        if ( *s == '\0' )
+            opt_argo = true;
+        else if ( (val = parse_bool(s, ss)) >= 0 )
             opt_argo = val;
         else if ( (val = parse_boolean("mac-permissive", s, ss)) >= 0 )
             opt_argo_mac_permissive = val;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 21:44:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 21:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404987.1638540 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1WH7-0005aI-SR; Tue, 01 Sep 2026 21:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404987.1638540; Tue, 01 Sep 2026 21:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1WH7-0005a8-PQ; Tue, 01 Sep 2026 21:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1404987;
 Tue, 01 Sep 2026 21:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1WH6-0005Zv-0Z
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 21:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1WH6-000NlB-0m
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 21:44:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1WH5-00AyDy-33
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 21:44:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=gFd45R145WaxcOYBqtPSn28iMX+fxFkgAWuGnLOJRL4=; b=PcNsIcwxu52SUelsjPpghSzsFW
	6hEVmvxav8dCzxeIu7Ge+tN7nZo0P1vXb7DOw1qz6gg4TL7fulo5eEK2WmR4EL5QKoE9QD4tCKo9Z
	VVjok1dDimHEF/igOlGLDPjsSPTRECk21JcZ8E+H1u3Koyb0PdAmrjFy8CiCkPAm27eY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pagewalk: Read guest PTEs with ACCESS_ONCE()
Message-Id: <E1x1WH5-00AyDy-33@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 21:44:11 +0000

commit 0345b835dc97dcd995e24df21c5ad6183907926e
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Aug 6 23:35:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    x86/pagewalk: Read guest PTEs with ACCESS_ONCE()
    
    This has been a plain C read for as far back as I can trace in history.
    
    Research into invented-loads has flagged it as a possible vulnerability.
    After analysis, it is believed to be a bug only, not a security vulnerability.
    
    The analysis suggests that we can read one value out of the guest, operate on
    another, and that this could be an in-guest privliege escalation.  Any entity
    in the guest able to modify the pagetables already has full privilege, so
    while Xen can potentially malfunction, the effects don't cross a privilege
    boundary.
    
    The analysis also suggests that this is worse for shadow guests because we may
    put the TOCTOU entry in the shadows, but this is inaccurate.  What we put in
    the shadows is still translated under the P2M and refers to guest physical
    address space.
    
    Either way, the code fits the pattern for invented loads, and it is a risk;
    harden the accesses.
    
    Link: https://github.com/xoreaxeaxeax/schrodingers-toctou/blob/main/observer-effect/audits/audit-xen-ptwalk-RELEASE-4.21.1.md#86-per-candidate-finding
    Fixes: 49f7c7364e0a ("Replace shadow pagetable code with shadow2.")
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/guest_walk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c
index f48c3ef75f..df2ccaa674 100644
--- a/xen/arch/x86/mm/guest_walk.c
+++ b/xen/arch/x86/mm/guest_walk.c
@@ -129,7 +129,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l4_table_offset(va) * sizeof(gw->l4e);
     if ( !hvmemul_read_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e)) )
     {
-        gw->l4e = l4p[guest_l4_table_offset(va)];
+        gw->l4e = (guest_l4e_t){ ACCESS_ONCE(l4p[guest_l4_table_offset(va)].l4) };
         hvmemul_write_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e));
     }
     gflags = guest_l4e_get_flags(gw->l4e);
@@ -164,7 +164,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l3_table_offset(va) * sizeof(gw->l3e);
     if ( !hvmemul_read_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e)) )
     {
-        gw->l3e = l3p[guest_l3_table_offset(va)];
+        gw->l3e = (guest_l3e_t){ ACCESS_ONCE(l3p[guest_l3_table_offset(va)].l3) };
         hvmemul_write_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e));
     }
     gflags = guest_l3e_get_flags(gw->l3e);
@@ -264,7 +264,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
     l2gpa += guest_l2_table_offset(va) * sizeof(gw->l2e);
     if ( !hvmemul_read_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e)) )
     {
-        gw->l2e = l2p[guest_l2_table_offset(va)];
+        gw->l2e = (guest_l2e_t){ ACCESS_ONCE(l2p[guest_l2_table_offset(va)].l2) };
         hvmemul_write_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e));
     }
 
@@ -353,7 +353,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l1_table_offset(va) * sizeof(gw->l1e);
     if ( !hvmemul_read_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e)) )
     {
-        gw->l1e = l1p[guest_l1_table_offset(va)];
+        gw->l1e = (guest_l1e_t){ ACCESS_ONCE(l1p[guest_l1_table_offset(va)].l1) };
         hvmemul_write_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e));
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 01 21:44:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Sep 2026 21:44:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404988.1638543 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1WHH-0005cR-TR; Tue, 01 Sep 2026 21:44:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404988.1638543; Tue, 01 Sep 2026 21:44:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1WHH-0005cJ-Qj; Tue, 01 Sep 2026 21:44:23 +0000
Received: by outflank-mailman (input) for mailman id 1404988;
 Tue, 01 Sep 2026 21:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1WHG-0005c9-3i
 for xen-changelog@lists.xenproject.org; Tue, 01 Sep 2026 21:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1WHG-000NlF-15
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 21:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1WHG-00Ayq9-08
 for xen-changelog@lists.xenproject.org;
 Tue, 01 Sep 2026 21:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=q631193C0jgjFmvp+Dp/08ElxYSjmnuzIQ7FJx2OfG8=; b=7OOX9qi3jgrwoxsAQfkNFdgSOe
	q7mkpMbPNZpvxFPS8dF9t4LuC2EmCP84ftqiwrXl6OnmMIbLuBLhVIOMhE9eczxX+l52qWoyqjk8f
	KYrazDO0cEfqgfbzIVp4rVyeHu6F0eML5fu7X+MzYQWAzTA4mcr0a9Q5Jdd1Orlk2asw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: Don't pad between function with x86 nops
Message-Id: <E1x1WHG-00Ayq9-08@xenbits.xenproject.org>
Date: Tue, 01 Sep 2026 21:44:22 +0000

commit 5504b16eea5e661b67d4fba3cf9283d85b9dd3dc
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 10:52:07 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    xen/arm: Don't pad between function with x86 nops
    
    This was copy&paste from x86.  It causes the padding between functions to be:
    
      a000026dd64:   90909090        adrp    x16, 9ff2147d000 <start-0xded83000>
    
    rather than:
    
      a000026dd64:   00000000        udf     #0
    
    No functional change.
    
    Fixes: 5da0d3123c0a ("arm: entry.S and head.S")
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/xen.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 2d5f1c516d..d4d9594033 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -47,7 +47,7 @@ SECTIONS
 
        *(.gnu.warning)
        _etext = .;             /* End of text section */
-  } :text = 0x9090
+  } :text
 
   . = ALIGN(PAGE_SIZE);
   .rodata : {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 00:33:10 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 00:33:10 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404998.1638547 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1YuW-0007ZC-2L; Wed, 02 Sep 2026 00:33:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404998.1638547; Wed, 02 Sep 2026 00:33:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1YuV-0007Z4-Vw; Wed, 02 Sep 2026 00:33:03 +0000
Received: by outflank-mailman (input) for mailman id 1404998;
 Wed, 02 Sep 2026 00:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1YuU-0007Yy-AX
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 00:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1YuU-000RTK-0c
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 00:33:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1YuT-00CL95-2q
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 00:33:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=oQr+g1tBRN6mRy/i4lHeZaEdwsLveq0b03/X3TVDtnU=; b=TqQUDxKSnpPwNstYleYnS1sDeO
	nmNc6SmkWvTvKH2JdnUr5y9swD8E59u+Y91J22bjTlbzq5wAkCpy1Ylm6uahXjQYjpL+65w5D68/5
	ba0mPEoglceH08Zt6i5VGGpSek+u6PBxWEXlb4nxabMdB8fd/K3PRKdZfWxSwM2XFXLc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/argo: Command line handling improvements
Message-Id: <E1x1YuT-00CL95-2q@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 00:33:01 +0000

commit a4049dd6acf4527bb684a066510c1cf34292d5e1
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue May 20 15:03:45 2025 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    xen/argo: Command line handling improvements
    
    Treat "argo" on the command line as a positive boolean, rather than requiring
    the user to pass "argo=1/on/enable/true".
    
    Move both opt_argo* variables into __ro_after_init.  They're set during
    command line parsing and never modified thereafter.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/common/argo.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/argo.c b/xen/common/argo.c
index 42dd516a18..0b9a54db36 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -80,8 +80,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_argo_unregister_ring_t);
 DEFINE_COMPAT_HANDLE(compat_argo_iov_t);
 #endif
 
-static bool __read_mostly opt_argo;
-static bool __read_mostly opt_argo_mac_permissive;
+static bool __ro_after_init opt_argo;
+static bool __ro_after_init opt_argo_mac_permissive;
 
 static int __init cf_check parse_argo(const char *s)
 {
@@ -93,7 +93,10 @@ static int __init cf_check parse_argo(const char *s)
         if ( !ss )
             ss = strchr(s, '\0');
 
-        if ( (val = parse_bool(s, ss)) >= 0 )
+        /* Intepret "argo" as a positive boolean. */
+        if ( *s == '\0' )
+            opt_argo = true;
+        else if ( (val = parse_bool(s, ss)) >= 0 )
             opt_argo = val;
         else if ( (val = parse_boolean("mac-permissive", s, ss)) >= 0 )
             opt_argo_mac_permissive = val;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 00:33:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 00:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1404999.1638551 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1Yuf-0007do-3n; Wed, 02 Sep 2026 00:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1404999.1638551; Wed, 02 Sep 2026 00:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1Yuf-0007dg-17; Wed, 02 Sep 2026 00:33:13 +0000
Received: by outflank-mailman (input) for mailman id 1404999;
 Wed, 02 Sep 2026 00:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1Yue-0007da-2j
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 00:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1Yue-000RV4-0z
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 00:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1Yue-00COhM-02
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 00:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=UL3KGTr4XyAti+LpepdwREjNdKEJeqEcDy7nnoV/+J0=; b=EwuxiOLOi9tAljP4GRuke6ILWi
	S/jPynhjtO8SRAxXbVujhYYUip4frhyPBs/rxhTV5+okrPCWcpEGlJPZApDQArxZSNCM1UaSIp5XY
	heN7UHV4mTXb2BlGe2EfrHsFx3iwfIJ0s6xCywJQOcMKL14dfKj+bX0QdLqz0PExHiY0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pagewalk: Read guest PTEs with ACCESS_ONCE()
Message-Id: <E1x1Yue-00COhM-02@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 00:33:12 +0000

commit 0345b835dc97dcd995e24df21c5ad6183907926e
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Aug 6 23:35:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    x86/pagewalk: Read guest PTEs with ACCESS_ONCE()
    
    This has been a plain C read for as far back as I can trace in history.
    
    Research into invented-loads has flagged it as a possible vulnerability.
    After analysis, it is believed to be a bug only, not a security vulnerability.
    
    The analysis suggests that we can read one value out of the guest, operate on
    another, and that this could be an in-guest privliege escalation.  Any entity
    in the guest able to modify the pagetables already has full privilege, so
    while Xen can potentially malfunction, the effects don't cross a privilege
    boundary.
    
    The analysis also suggests that this is worse for shadow guests because we may
    put the TOCTOU entry in the shadows, but this is inaccurate.  What we put in
    the shadows is still translated under the P2M and refers to guest physical
    address space.
    
    Either way, the code fits the pattern for invented loads, and it is a risk;
    harden the accesses.
    
    Link: https://github.com/xoreaxeaxeax/schrodingers-toctou/blob/main/observer-effect/audits/audit-xen-ptwalk-RELEASE-4.21.1.md#86-per-candidate-finding
    Fixes: 49f7c7364e0a ("Replace shadow pagetable code with shadow2.")
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/guest_walk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c
index f48c3ef75f..df2ccaa674 100644
--- a/xen/arch/x86/mm/guest_walk.c
+++ b/xen/arch/x86/mm/guest_walk.c
@@ -129,7 +129,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l4_table_offset(va) * sizeof(gw->l4e);
     if ( !hvmemul_read_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e)) )
     {
-        gw->l4e = l4p[guest_l4_table_offset(va)];
+        gw->l4e = (guest_l4e_t){ ACCESS_ONCE(l4p[guest_l4_table_offset(va)].l4) };
         hvmemul_write_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e));
     }
     gflags = guest_l4e_get_flags(gw->l4e);
@@ -164,7 +164,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l3_table_offset(va) * sizeof(gw->l3e);
     if ( !hvmemul_read_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e)) )
     {
-        gw->l3e = l3p[guest_l3_table_offset(va)];
+        gw->l3e = (guest_l3e_t){ ACCESS_ONCE(l3p[guest_l3_table_offset(va)].l3) };
         hvmemul_write_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e));
     }
     gflags = guest_l3e_get_flags(gw->l3e);
@@ -264,7 +264,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
     l2gpa += guest_l2_table_offset(va) * sizeof(gw->l2e);
     if ( !hvmemul_read_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e)) )
     {
-        gw->l2e = l2p[guest_l2_table_offset(va)];
+        gw->l2e = (guest_l2e_t){ ACCESS_ONCE(l2p[guest_l2_table_offset(va)].l2) };
         hvmemul_write_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e));
     }
 
@@ -353,7 +353,7 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l1_table_offset(va) * sizeof(gw->l1e);
     if ( !hvmemul_read_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e)) )
     {
-        gw->l1e = l1p[guest_l1_table_offset(va)];
+        gw->l1e = (guest_l1e_t){ ACCESS_ONCE(l1p[guest_l1_table_offset(va)].l1) };
         hvmemul_write_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e));
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 00:33:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 00:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405000.1638555 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1Yup-0007fy-58; Wed, 02 Sep 2026 00:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405000.1638555; Wed, 02 Sep 2026 00:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1Yup-0007fq-2S; Wed, 02 Sep 2026 00:33:23 +0000
Received: by outflank-mailman (input) for mailman id 1405000;
 Wed, 02 Sep 2026 00:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1Yuo-0007fk-6W
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 00:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1Yuo-000RV8-1M
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 00:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1Yuo-00CSJg-0N
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 00:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=l45peG0II7ZC6mRcsZDhQ9TMXB/IhziC0nfRTIATmVQ=; b=UJiEQjB1gRVyqtigNdicrgGlZv
	yYq+K+2+qc4MF2zxJ2NwpMblimfxnPoLffDms+zkaeLj+NwaM1w2878ur32fUYxDst+6H3RXgVMsM
	PDHu4FSKT+TQzf+7zOwiHlwzlmyVpVQ11I7RFCbJuipfOJkdr0tND3gMBw4vVszn8LzI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Don't pad between function with x86 nops
Message-Id: <E1x1Yuo-00CSJg-0N@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 00:33:22 +0000

commit 5504b16eea5e661b67d4fba3cf9283d85b9dd3dc
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 10:52:07 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    xen/arm: Don't pad between function with x86 nops
    
    This was copy&paste from x86.  It causes the padding between functions to be:
    
      a000026dd64:   90909090        adrp    x16, 9ff2147d000 <start-0xded83000>
    
    rather than:
    
      a000026dd64:   00000000        udf     #0
    
    No functional change.
    
    Fixes: 5da0d3123c0a ("arm: entry.S and head.S")
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/xen.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 2d5f1c516d..d4d9594033 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -47,7 +47,7 @@ SECTIONS
 
        *(.gnu.warning)
        _etext = .;             /* End of text section */
-  } :text = 0x9090
+  } :text
 
   . = ALIGN(PAGE_SIZE);
   .rodata : {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 14:22:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 14:22:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405993.1639414 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lqm-00017O-A4; Wed, 02 Sep 2026 14:22:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405993.1639414; Wed, 02 Sep 2026 14:22:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lqm-00017G-7R; Wed, 02 Sep 2026 14:22:04 +0000
Received: by outflank-mailman (input) for mailman id 1405993;
 Wed, 02 Sep 2026 14:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1lqk-000176-JU
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 14:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lqk-001vaG-25
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lqk-00AmCo-14
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+NrxlYgR9nx3PlvjgmwQ5f/q6cHMpJvFlIXMR72DdDg=; b=dgzExvJ4UBaGGxpTOhPqEC2SDv
	lycZIYC/QWqzfgv5DUC4dGf3stQ6GFajp1tBNuFCgjMGw58I150XLP7nq12SUGxm0ySWRjuBRVbrC
	4cEmjqLUYLTnqdpdbmUbXow1h4V6EGXpjFY1hPhfQSuIAiESzp74yHGKaP492Nc9u9KQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/time: CMOS RTC may run in binary mode
Message-Id: <E1x1lqk-00AmCo-14@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 14:22:02 +0000

commit 9d2bbfb79789e9bdfc7239ffca195d102c287559
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:11:50 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:11:50 2026 +0200

    x86/time: CMOS RTC may run in binary mode
    
    Indicating it would always use BCD mode is just wrong (and then the
    comment there said the opposite). All halfway recent (and really all 64-
    bit capable) systems having a CMOS RTC should properly indicate the mode
    in control register B.
    
    Make use of the flag, but provide a fallback mechanism in case people run
    into systems not matching the above assumption. Additionally, when binary
    mode is indicated and when "cmos-rtc-probe" is in use (but "cmos-rtc-bcd"
    isn't), probe whether the clock really runs in binary mode. (This probing,
    sadly, can take up to 10 seconds.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 docs/misc/xen-command-line.pandoc      |  8 ++++++
 xen/arch/x86/include/asm/mc146818rtc.h |  1 -
 xen/arch/x86/time.c                    | 51 +++++++++++++++++++++++++++++++++-
 3 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc
index 1c711fa980..95cc3312f1 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -339,6 +339,14 @@ parameter to "stable:socket".
 Specify the event count threshold for raising Corrected Machine Check
 Interrupts.  Specifying zero disables CMCI handling.
 
+### cmos-rtc-bcd (x86)
+> `= <boolean>`
+
+> Default: `false`
+
+Flag to indicate the CMOS Real Time Clock uses BCD mode irrespective of
+control register B indicating binary mode.
+
 ### cmos-rtc-probe (x86)
 > `= <boolean>`
 
diff --git a/xen/arch/x86/include/asm/mc146818rtc.h b/xen/arch/x86/include/asm/mc146818rtc.h
index 1a34512d29..2c02caba4d 100644
--- a/xen/arch/x86/include/asm/mc146818rtc.h
+++ b/xen/arch/x86/include/asm/mc146818rtc.h
@@ -96,7 +96,6 @@ bool is_cmos_port(unsigned int port, unsigned int bytes,
 
 #ifndef RTC_PORT
 #define RTC_PORT(x)	(0x70 + (x))
-#define RTC_ALWAYS_BCD	1	/* RTC operates in binary mode */
 #endif
 
 /*
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index bc0161f7c2..f35555f185 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1250,6 +1250,9 @@ mktime (unsigned int year, unsigned int mon,
         )*60 + sec; /* finally seconds */
 }
 
+static bool __ro_after_init opt_cmos_rtc_bcd;
+boolean_param("cmos-rtc-bcd", opt_cmos_rtc_bcd);
+
 struct rtc_time {
     unsigned int year, mon, day, hour, min, sec;
 };
@@ -1285,7 +1288,7 @@ static bool __get_cmos_time(struct rtc_time *rtc)
     if ( acpi_gbl_FADT.century && acpi_gbl_FADT.century < 0x80 )
         century = CMOS_READ(acpi_gbl_FADT.century);
 
-    bcd = RTC_ALWAYS_BCD || !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY);
+    bcd = opt_cmos_rtc_bcd || !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY);
 
     spin_unlock_irqrestore(&rtc_lock, flags);
 
@@ -1353,6 +1356,48 @@ static bool __init cmos_rtc_probe(void)
     return false;
 }
 
+static inline bool __init attr_const is_bcd(unsigned int x)
+{
+    return (x & 0xf) < 10 && (x >> 4) < 10;
+}
+
+static void __init cmos_rtc_probe_bcd(void)
+{
+    bool bcd;
+    unsigned long flags;
+
+    if ( opt_cmos_rtc_bcd )
+        return;
+
+    spin_lock_irqsave(&rtc_lock, flags);
+    bcd = !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY);
+    spin_unlock_irqrestore(&rtc_lock, flags);
+
+    if ( bcd )
+        return;
+
+    for ( unsigned int seclo = 0; ; )
+    {
+        struct rtc_time rtc;
+
+        if ( !__get_cmos_time(&rtc) ||
+             !is_bcd(rtc.sec) ||
+             !is_bcd(rtc.min) ||
+             !is_bcd(rtc.hour) ||
+             !is_bcd(rtc.day) ||
+             !is_bcd(rtc.mon) )
+            return;
+
+        if ( seclo > (rtc.sec & 0xf) )
+            break;
+
+        seclo = rtc.sec & 0xf;
+    }
+
+    printk(XENLOG_WARNING "CMOS RTC indicates binary mode but uses BCD\n");
+
+    opt_cmos_rtc_bcd = true;
+}
 
 static unsigned long cmos_rtc_read(void)
 {
@@ -1614,6 +1659,10 @@ static void __init probe_wallclock(void)
     if ( cmos_rtc_probe() )
     {
         wallclock_source = WALLCLOCK_CMOS;
+
+        if ( opt_cmos_rtc_probe )
+            cmos_rtc_probe_bcd();
+
         return;
     }
     if ( efi_enabled(EFI_RS) && efi_get_time() )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 14:22:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 14:22:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405994.1639417 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lqw-00019M-BF; Wed, 02 Sep 2026 14:22:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405994.1639417; Wed, 02 Sep 2026 14:22:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lqw-00019F-8m; Wed, 02 Sep 2026 14:22:14 +0000
Received: by outflank-mailman (input) for mailman id 1405994;
 Wed, 02 Sep 2026 14:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1lqu-000193-GZ
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 14:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lqu-001vac-2N
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lqu-00AnZI-1S
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=32UQKsMW1awdxeyyIeLNnfY3UHN4rxd5/tTLTbD27C4=; b=sruzA002N9qlDoVwg2P5nKGqvs
	f/5LmBKUZtBu1n341lAAOs5iiIuPacZmNeTQblUMONSZ2Es5ViszanhpkTcbilkwTZwBfa+5UlKHJ
	wcYg8lJf3zhzYoTOfxTNWhQ7sXtH5XSvDZH/UlyWcz0A0HBtS4eY95sZa3edYiWldXJ4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] time: shorten year determination loop
Message-Id: <E1x1lqu-00AnZI-1S@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 14:22:12 +0000

commit b244971a8b4d86a1c6ef3814b5c71c5ca74bebe1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:12:14 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:12:14 2026 +0200

    time: shorten year determination loop
    
    For dates very far into the future (the MC146818 RTC's century byte can go
    up to the 99th century), the present year-wise loop would become somewhat
    inefficient (taking perhaps several thousand iterations). Prefix that loop
    with a 400-year granular calculation (somewhat like the earlier loop does
    for dates in the past).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/common/time.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/xen/common/time.c b/xen/common/time.c
index 2b8c98e2de..0ddf65448d 100644
--- a/xen/common/time.c
+++ b/xen/common/time.c
@@ -29,6 +29,8 @@ bool __ro_after_init NOW_good;
 #define __isleap(year) \
   ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
 
+#define DAYS_IN_400_YEARS (365 * 303 + 366 * 97)
+
 /* How many days are in each month.  */
 static const unsigned short int __mon_lengths[2][12] = {
     /* Normal years.  */
@@ -59,7 +61,7 @@ struct tm gmtime(unsigned long t)
     while ( t & (1UL<<39) )
     {
         y -= 400;
-        t += ((unsigned long)(365 * 303 + 366 * 97)) * SECS_PER_DAY;
+        t += (unsigned long)DAYS_IN_400_YEARS * SECS_PER_DAY;
     }
     t &= (1UL << 40) - 1;
 #endif
@@ -73,6 +75,11 @@ struct tm gmtime(unsigned long t)
     tbuf.tm_sec = rem % 60;
     /* January 1, 1970 was a Thursday.  */
     tbuf.tm_wday = (4 + days) % 7;
+    if ( days >= DAYS_IN_400_YEARS )
+    {
+        y += (days / DAYS_IN_400_YEARS) * 400;
+        days %= DAYS_IN_400_YEARS;
+    }
     while ( days >= (rem = __isleap(y) ? 366 : 365) )
     {
         ++y;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 14:22:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 14:22:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405995.1639422 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lr5-0001Ce-D7; Wed, 02 Sep 2026 14:22:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405995.1639422; Wed, 02 Sep 2026 14:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lr5-0001CU-AA; Wed, 02 Sep 2026 14:22:23 +0000
Received: by outflank-mailman (input) for mailman id 1405995;
 Wed, 02 Sep 2026 14:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1lr4-0001BH-KJ
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 14:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lr4-001vag-2k
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lr4-00Aow9-1m
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/H4u5FRWTuNuWyd6CrLKVVaRMjGwtNVHekisn/w3ezY=; b=tny5kWSs6kAdN5Y+PQdHhHTjov
	PoCn4/qj3UlWTQrAALIp2rLj0qoN8XAmdT5WdsBKkk6ODnccqxGvNKSZ4fjbEfutKHmUznk9V5gHP
	qjdHB1j5aecfXMuLVosjzJQjgoTJMrWJQjbjb+NjcFxJUU/Y6AIBeMz3Q0TDJIPtvP/Y=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/vRTC: the use_timer field is a boolean one
Message-Id: <E1x1lr4-00Aow9-1m@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 14:22:22 +0000

commit dc2382d1a57921051d131ac3d7ae877f7b6383fc
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:12:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:12:53 2026 +0200

    x86/vRTC: the use_timer field is a boolean one
    
    ... and hence wants to be of bool type.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/rtc.c             | 6 +++---
 xen/arch/x86/include/asm/hvm/vpt.h | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 9a53188dac..78543ab87c 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -189,7 +189,7 @@ static void check_update_timer(RTCState *s)
     if (!(s->hw.cmos_data[RTC_REG_C] & RTC_UF) &&
             !(s->hw.cmos_data[RTC_REG_B] & RTC_SET))
     {
-        s->use_timer = 1;
+        s->use_timer = true;
         guest_usec = get_localtime_us(d) % USEC_PER_SEC;
         if (guest_usec >= (USEC_PER_SEC - 244))
         {
@@ -217,7 +217,7 @@ static void check_update_timer(RTCState *s)
         }
     }
     else
-        s->use_timer = 0;
+        s->use_timer = false;
 }
 
 static void cf_check rtc_update_timer(void *opaque)
@@ -683,7 +683,7 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
         break;
     case RTC_REG_A:
         ret = s->hw.cmos_data[s->hw.cmos_index];
-        if ((s->use_timer == 0) && update_in_progress(s))
+        if ( !s->use_timer && update_in_progress(s) )
             ret |= RTC_UIP;
         break;
     case RTC_REG_C:
diff --git a/xen/arch/x86/include/asm/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/vpt.h
index 24f0918280..2f6bd28a82 100644
--- a/xen/arch/x86/include/asm/hvm/vpt.h
+++ b/xen/arch/x86/include/asm/hvm/vpt.h
@@ -106,7 +106,9 @@ typedef struct RTCState {
     s_time_t check_ticks_since;
     int period;
     uint8_t pt_dead_ticks;
-    uint32_t use_timer;
+
+    bool use_timer;
+
     spinlock_t lock;
 } RTCState;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 14:22:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 14:22:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405996.1639426 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lrF-0001Ei-E7; Wed, 02 Sep 2026 14:22:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405996.1639426; Wed, 02 Sep 2026 14:22:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lrF-0001Ea-BU; Wed, 02 Sep 2026 14:22:33 +0000
Received: by outflank-mailman (input) for mailman id 1405996;
 Wed, 02 Sep 2026 14:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1lrE-0001EU-O8
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 14:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lrE-001vam-38
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lrE-00AqEP-29
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=8ipxy54B4r9WIp5uAvupBk2FIOOjryyCt/DSP1JdRz4=; b=mVDUXhDLE/q4BAyC+a0tV6BNqN
	r6IC+JpyayeJgyW2QntrNrCHwihq3/OcG9sHohtD7XqQMo9sWRpAw+4dmdr94cbIGx0auNxadbdZE
	j9FqX7LqHPc1GDx2yzS4whyCIzm21ncuKGH3XXiwXUI907TZ8G10I2AfGTAlpi78Pm50=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/vRTC: support century field
Message-Id: <E1x1lrE-00AqEP-29@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 14:22:32 +0000

commit f2ff80877f6680023fdf29f229b7f612418e527e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:14:08 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:14:08 2026 +0200

    x86/vRTC: support century field
    
    Both ROMBIOS and SeaBIOS (with CONFIG_QEMU=y, as we build it) blindly
    assume availability of this field (at its conventional index 0x32); OVMF
    at least has code to inspect FADT. Hence we ought to have supported it
    virtually forever.
    
    As the index is beyond RTC_CMOS_SIZE, leverage the padding field in
    struct hvm_hw_rtc to hold its value. Update the field only when involved
    values are valid BCD century specifiers. Otherwise (for VMs migrated in
    from an older hypervisor) leave handling to the DM.
    
    This makes the Linux rtc-cmos driver report y3k compatibility.
    
    In the new rtc_check(), besides checking the new fields also check the
    pre-existing pad0 field.
    
    While extending xen-hvmctx.c:dump_rtc() also add RTC offset there.
    
    Fixes: 4ca161214355 ("[HVM] Move RTC emulation into the hypervisor")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 tools/libacpi/static_tables.c          |  6 ++-
 tools/misc/xen-hvmctx.c                |  2 +-
 xen/arch/x86/hvm/rtc.c                 | 86 ++++++++++++++++++++++++++++++----
 xen/arch/x86/include/asm/hvm/vpt.h     |  2 +
 xen/arch/x86/include/asm/mc146818rtc.h |  3 ++
 xen/include/public/arch-x86/hvm/save.h |  2 +
 6 files changed, 91 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/static_tables.c b/tools/libacpi/static_tables.c
index 715f46fee0..11cbeced64 100644
--- a/tools/libacpi/static_tables.c
+++ b/tools/libacpi/static_tables.c
@@ -33,6 +33,8 @@ struct acpi_20_facs Facs = {
 #define ACPI_PM_TMR_BLK_BIT_WIDTH           0x20
 #define ACPI_PM_TMR_BLK_BIT_OFFSET          0x00
 
+#define CMOS_CENTURY 0x32 /* Conventional index used also without ACPI */
+
 struct acpi_fadt Fadt = {
     .header = {
         .signature    = ACPI_FADT_SIGNATURE,
@@ -88,7 +90,9 @@ struct acpi_fadt Fadt = {
         .register_bit_width  = ACPI_PM_TMR_BLK_BIT_WIDTH,
         .register_bit_offset = ACPI_PM_TMR_BLK_BIT_OFFSET,
         .address             = ACPI_PM_TMR_BLK_ADDRESS_V1,
-    }
+    },
+
+    .century = CMOS_CENTURY,
 };
 
 struct acpi_20_rsdt Rsdt = {
diff --git a/tools/misc/xen-hvmctx.c b/tools/misc/xen-hvmctx.c
index ecb7f054be..69b22fe7a4 100644
--- a/tools/misc/xen-hvmctx.c
+++ b/tools/misc/xen-hvmctx.c
@@ -311,7 +311,7 @@ static void dump_rtc(void)
     printf("              0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x, index 0x%02x\n",
            r.cmos_data[8], r.cmos_data[9], r.cmos_data[10], r.cmos_data[11], 
            r.cmos_data[12], r.cmos_data[13], r.cmos_index);
-
+    printf("         century 0x%02x  offset %"PRId64"\n", r.century, r.rtc_offset);
 }
 
 static void dump_hpet(void)
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 78543ab87c..4e0d28d1ea 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -484,16 +484,27 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
         data &= 0x7f;
         s->hw.cmos_index = data;
         spin_unlock(&s->lock);
-        return (data < RTC_CMOS_SIZE);
+        return data < RTC_CMOS_SIZE || (s->has_century && data == RTC_CENTURY);
     }
 
-    if ( s->hw.cmos_index >= RTC_CMOS_SIZE )
+    switch ( s->hw.cmos_index )
     {
+    case 0 ... RTC_CMOS_SIZE - 1:
+        orig = s->hw.cmos_data[s->hw.cmos_index];
+        break;
+
+    case RTC_CENTURY:
+        if ( s->has_century )
+        {
+            orig = s->hw.century;
+            break;
+        }
+        fallthrough;
+    default:
         spin_unlock(&s->lock);
         return 0;
     }
 
-    orig = s->hw.cmos_data[s->hw.cmos_index];
     switch ( s->hw.cmos_index )
     {
     case RTC_SECONDS_ALARM:
@@ -509,6 +520,7 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
     case RTC_DAY_OF_MONTH:
     case RTC_MONTH:
     case RTC_YEAR:
+    case RTC_CENTURY:
         /* if in set mode, just write the register */
         if ( (s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
             s->hw.cmos_data[s->hw.cmos_index] = data;
@@ -517,7 +529,10 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
             /* Fetch the current time and update just this field. */
             s->current_tm = gmtime(get_localtime(d));
             rtc_copy_date(s);
-            s->hw.cmos_data[s->hw.cmos_index] = data;
+            if ( s->hw.cmos_index != RTC_CENTURY )
+                s->hw.cmos_data[s->hw.cmos_index] = data;
+            else
+                s->hw.century = data;
             rtc_set_time(s);
         }
         alarm_timer_update(s);
@@ -593,7 +608,16 @@ static void rtc_set_time(RTCState *s)
     tm->tm_wday = from_bcd(s, s->hw.cmos_data[RTC_DAY_OF_WEEK]);
     tm->tm_mday = from_bcd(s, s->hw.cmos_data[RTC_DAY_OF_MONTH]);
     tm->tm_mon = from_bcd(s, s->hw.cmos_data[RTC_MONTH]) - 1;
-    tm->tm_year = from_bcd(s, s->hw.cmos_data[RTC_YEAR]) + 100;
+    tm->tm_year = from_bcd(s, s->hw.cmos_data[RTC_YEAR]);
+    if ( s->has_century )
+    {
+        unsigned int century = s->hw.century;
+
+        BCD_TO_BIN(century);
+        tm->tm_year += century * 100 - epoch_year;
+    }
+    else
+        tm->tm_year += 100;
 
     after = mktime(get_year(tm->tm_year), tm->tm_mon + 1, tm->tm_mday,
                    tm->tm_hour, tm->tm_min, tm->tm_sec);
@@ -631,6 +655,12 @@ static void rtc_copy_date(RTCState *s)
     s->hw.cmos_data[RTC_DAY_OF_MONTH] = to_bcd(s, tm->tm_mday);
     s->hw.cmos_data[RTC_MONTH] = to_bcd(s, tm->tm_mon + 1);
     s->hw.cmos_data[RTC_YEAR] = to_bcd(s, tm->tm_year % 100);
+
+    if ( s->has_century )
+    {
+        s->hw.century = get_year(tm->tm_year) / 100;
+        BIN_TO_BCD(s->hw.century);
+    }
 }
 
 static int update_in_progress(RTCState *s)
@@ -658,7 +688,8 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
 
     spin_lock(&s->lock);
 
-    if ( s->hw.cmos_index >= RTC_CMOS_SIZE )
+    if ( s->hw.cmos_index >= RTC_CMOS_SIZE &&
+         (!s->has_century || s->hw.cmos_index != RTC_CENTURY) )
     {
         spin_unlock(&s->lock);
         return false;
@@ -673,13 +704,17 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
     case RTC_DAY_OF_MONTH:
     case RTC_MONTH:
     case RTC_YEAR:
+    case RTC_CENTURY:
         /* if not in set mode, adjust cmos before reading*/
         if (!(s->hw.cmos_data[RTC_REG_B] & RTC_SET))
         {
             s->current_tm = gmtime(get_localtime(d));
             rtc_copy_date(s);
         }
-        ret = s->hw.cmos_data[s->hw.cmos_index];
+        if ( s->hw.cmos_index != RTC_CENTURY )
+            ret = s->hw.cmos_data[s->hw.cmos_index];
+        else
+            ret = s->hw.century;
         break;
     case RTC_REG_A:
         ret = s->hw.cmos_data[s->hw.cmos_index];
@@ -769,6 +804,32 @@ static int cf_check rtc_save(struct vcpu *v, hvm_domain_context_t *h)
     return rc;
 }
 
+static int cf_check rtc_check(const struct domain *d, hvm_domain_context_t *h)
+{
+    const struct hvm_save_descriptor *desc =
+        (const struct hvm_save_descriptor *)&h->data[h->cur];
+    struct hvm_hw_rtc s;
+
+    if ( !has_vrtc(d) )
+        return -ENODEV;
+
+    if ( hvm_load_entry_zeroextend(RTC, h, &s) != 0 )
+        return -ENODATA;
+
+    if ( s.pad0 )
+        return -EINVAL;
+
+    for ( unsigned int i = 0; i < ARRAY_SIZE(s.pad1); ++i )
+        if ( s.pad1[i] )
+            return -EINVAL;
+
+    if ( desc->length >= endof_field(struct hvm_hw_rtc, century) &&
+         ((s.century & 0xf) >= 10 || (s.century >> 4) >= 10) )
+        return -EINVAL;
+
+    return 0;
+}
+
 /* Reload the hardware state from a saved domain */
 static int cf_check rtc_load(struct domain *d, hvm_domain_context_t *h)
 {
@@ -802,12 +863,15 @@ static int cf_check rtc_load(struct domain *d, hvm_domain_context_t *h)
     check_update_timer(s);
     alarm_timer_update(s);
 
+    if ( !s->hw.century )
+        s->has_century = false;
+
     spin_unlock(&s->lock);
 
     return 0;
 }
 
-HVM_REGISTER_SAVE_RESTORE(RTC, rtc_save, NULL, rtc_load, 1, HVMSR_PER_DOM);
+HVM_REGISTER_SAVE_RESTORE(RTC, rtc_save, rtc_check, rtc_load, 1, HVMSR_PER_DOM);
 
 void rtc_reset(struct domain *d)
 {
@@ -882,6 +946,12 @@ void rtc_init(struct domain *d)
     s->hw.cmos_data[RTC_REG_C] = 0;
     s->hw.cmos_data[RTC_REG_D] = RTC_VRT;
 
+    /*
+     * By default we make the century byte available, unless an incoming save
+     * record says otherwise.
+     */
+    s->has_century = true;
+
     s->current_tm = gmtime(get_localtime(d));
     s->start_time = NOW();
 
diff --git a/xen/arch/x86/include/asm/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/vpt.h
index 2f6bd28a82..f6bcec8090 100644
--- a/xen/arch/x86/include/asm/hvm/vpt.h
+++ b/xen/arch/x86/include/asm/hvm/vpt.h
@@ -109,6 +109,8 @@ typedef struct RTCState {
 
     bool use_timer;
 
+    bool has_century;
+
     spinlock_t lock;
 } RTCState;
 
diff --git a/xen/arch/x86/include/asm/mc146818rtc.h b/xen/arch/x86/include/asm/mc146818rtc.h
index 2c02caba4d..c77c5bc216 100644
--- a/xen/arch/x86/include/asm/mc146818rtc.h
+++ b/xen/arch/x86/include/asm/mc146818rtc.h
@@ -37,6 +37,9 @@ bool is_cmos_port(unsigned int port, unsigned int bytes,
 #define RTC_REG_C               12
 #define RTC_REG_D               13
 
+/* Conventional index used without (and typically also with) ACPI. */
+#define RTC_CENTURY             0x32
+
 /**********************************************************************
  * register details
  **********************************************************************/
diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h
index 9c4bfc7ebd..44d7924777 100644
--- a/xen/include/public/arch-x86/hvm/save.h
+++ b/xen/include/public/arch-x86/hvm/save.h
@@ -488,6 +488,8 @@ struct hvm_hw_rtc {
     uint8_t pad0;
     /* RTC offset from host time */
     int64_t rtc_offset;
+    uint8_t century;
+    uint8_t pad1[7];
 };
 
 DECLARE_HVM_SAVE_TYPE(RTC, 11, struct hvm_hw_rtc);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 14:22:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 14:22:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405997.1639430 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lrP-0001H0-Fw; Wed, 02 Sep 2026 14:22:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405997.1639430; Wed, 02 Sep 2026 14:22:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lrP-0001Gs-Cr; Wed, 02 Sep 2026 14:22:43 +0000
Received: by outflank-mailman (input) for mailman id 1405997;
 Wed, 02 Sep 2026 14:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1lrO-0001Gk-Rc
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 14:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lrP-001vaq-0G
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lrO-00Arbk-2Z
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2QUaRZyZ1qW9n87zqYvILojPBzwYC9yBmBtdscm+fRs=; b=3Aq4GDg2OtQi3b5vXPKB4M2R/4
	ZOUN0Pt8ytaJpUU00T8Rx/9Ifx3ypGfyB/X/z31J1YEaxYy/P5hRlSMnal4oIslLbaH0+dBT6mX2B
	0/h46XSI3z+IRyM/84qj+RYDDZf5RMKldeheNJa179Pq17luvA4F3E/vn6QBEc18A+IA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/CPU: re-arrange tail of early_cpu_init()
Message-Id: <E1x1lrO-00Arbk-2Z@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 14:22:42 +0000

commit 11f8d55624d122320f50b8a853d3bedfaeaed271
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:14:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:14:55 2026 +0200

    x86/CPU: re-arrange tail of early_cpu_init()
    
    Some early setup doesn't need re-doing after ucode load. Move the call to
    initialize_cpu_data() slightly up and add a conditional return point.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/cpu/common.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index 771ec2cf86..4be86e1f7b 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -432,10 +432,18 @@ void __init early_cpu_init(bool verbose)
 		paddr_bits -= (ebx >> 6) & 0x3f;
 	}
 
+	initialize_cpu_data(0);
+
+	if (!verbose)
+		return;
+
+	/*
+	 * Work which doesn't need repeating after microcode load goes below
+	 * here.
+	 */
+
 	if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
 		park_offline_cpus = opt_mce;
-
-	initialize_cpu_data(0);
 }
 
 void reset_cpuinfo(struct cpuinfo_x86 *c, bool keep_basic)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 14:22:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 14:22:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1405998.1639435 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lrZ-0001JY-Io; Wed, 02 Sep 2026 14:22:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1405998.1639435; Wed, 02 Sep 2026 14:22:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1lrZ-0001JN-Fe; Wed, 02 Sep 2026 14:22:53 +0000
Received: by outflank-mailman (input) for mailman id 1405998;
 Wed, 02 Sep 2026 14:22:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1lrY-0001JH-Uk
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 14:22:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lrZ-001vau-0Z
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1lrY-00At9Q-2s
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 14:22:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=306eLtgjJVCN5wDXG8FwuO6qkKtlmDzuYMJZMwJpoc0=; b=bX94/dhyXzkzlVdaLQIak2yQzV
	ZrkUF0oitSMN45EEx7slSFTIQdYTGeHjm9pdWxfbLVCO/jdqWzJEWKdwnWu7QO9eVKUJbgmcFASXm
	aSlNzn8s8Lqp43gvqmumKXmE5nvsf72zHFsxEbJ5kRY+gdkMoEGYkZoqFsmew9FkFt1s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/time: avoid early uses of NOW() to return zero
Message-Id: <E1x1lrY-00At9Q-2s@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 14:22:52 +0000

commit e85f3521a473b6c3efd712572438ccabb3a577a0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:15:46 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:15:46 2026 +0200

    x86/time: avoid early uses of NOW() to return zero
    
    Waiting loops like the one in flush_command_buffer() will degenerate to
    infinite ones when used early enough for NOW() to still return constant
    zero. Make sure the returned value at least monotonically increases. When
    available, use nominal frequency values as initial approximation.
    
    Do this only in get_s_time(), as producing a sane value in
    get_s_time_fixed() for non-zero inputs won't be reasonably possible.
    Put an assertion there.
    
    Reported-by: Roger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/cpu/common.c            | 34 ++++++++++++++++++++++++++++++++++
 xen/arch/x86/cpu/intel.c             |  4 ++--
 xen/arch/x86/include/asm/processor.h |  3 +++
 xen/arch/x86/include/asm/time.h      |  1 +
 xen/arch/x86/time.c                  | 36 ++++++++++++++++++++++++++++++++++++
 5 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index 4be86e1f7b..d045ed6b41 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -19,6 +19,7 @@
 #include <asm/random.h>
 #include <asm/setup.h>
 #include <asm/shstk.h>
+#include <asm/time.h>
 #include <asm/xstate.h>
 
 #include <public/sysctl.h>
@@ -444,6 +445,39 @@ void __init early_cpu_init(bool verbose)
 
 	if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
 		park_offline_cpus = opt_mce;
+
+	/*
+	 * If nominal freq isn't available, use highest, thus causing NOW()
+	 * output to move more slowly.  See preset_tsc_scale().
+	 */
+	if (c->cpuid_level >= 0x15) {
+		cpuid(0x15, &eax, &ebx, &ecx, &edx);
+
+		if (ecx && ebx && eax)
+			preset_tsc_scale(DIV_ROUND_UP(ecx * 1UL * ebx, eax));
+		else if (c->cpuid_level >= 0x16) {
+			/* Assume CPU base freq ≈ TSC freq. */
+			cpuid(0x16, &eax, &ebx, &ecx, &edx);
+			if (eax)
+				preset_tsc_scale(eax * 1000000UL);
+			else if (ebx)
+				preset_tsc_scale(ebx * 1000000UL);
+		}
+	} else if (c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) {
+		unsigned int nom_mhz = 0, hi_mhz = 0;
+
+		amd_process_freq(c, NULL, &nom_mhz, &hi_mhz);
+		if (nom_mhz)
+			preset_tsc_scale(nom_mhz * 1000000UL);
+		else if (hi_mhz)
+			preset_tsc_scale(hi_mhz * 1000000UL);
+	} else if (c->vendor & X86_VENDOR_INTEL) {
+		unsigned int hi_mhz = 0;
+
+		intel_process_freq(c, NULL, &hi_mhz);
+		if (hi_mhz)
+			preset_tsc_scale(hi_mhz * 1000000UL);
+	}
 }
 
 void reset_cpuinfo(struct cpuinfo_x86 *c, bool keep_basic)
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 5c07140695..1006126bc3 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -476,8 +476,8 @@ static int num_cpu_cores(struct cpuinfo_x86 *c)
 		return 1;
 }
 
-static void intel_process_freq(const struct cpuinfo_x86 *c,
-                               unsigned int *min_mhz, unsigned int *max_mhz)
+void intel_process_freq(const struct cpuinfo_x86 *c,
+                        unsigned int *min_mhz, unsigned int *max_mhz)
 {
     uint64_t msrval;
     uint8_t max_ratio, min_ratio;
diff --git a/xen/arch/x86/include/asm/processor.h b/xen/arch/x86/include/asm/processor.h
index 4b200428be..4b17e13a97 100644
--- a/xen/arch/x86/include/asm/processor.h
+++ b/xen/arch/x86/include/asm/processor.h
@@ -417,6 +417,9 @@ static inline uint8_t get_cpu_family(uint32_t raw, uint8_t *model,
     return fam;
 }
 
+void intel_process_freq(const struct cpuinfo_x86 *c,
+                        unsigned int *min_mhz, unsigned int *max_mhz);
+
 #ifdef CONFIG_INTEL
 extern int8_t opt_tsx;
 extern bool rtm_disabled;
diff --git a/xen/arch/x86/include/asm/time.h b/xen/arch/x86/include/asm/time.h
index ed763ebc1b..6c8f0fe58c 100644
--- a/xen/arch/x86/include/asm/time.h
+++ b/xen/arch/x86/include/asm/time.h
@@ -23,6 +23,7 @@ mktime (unsigned int year, unsigned int mon,
 int time_suspend(void);
 int time_resume(void);
 
+void preset_tsc_scale(unsigned long freq);
 void init_percpu_time(void);
 void time_latch_stamps(void);
 
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index f35555f185..f37fddc61e 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1713,6 +1713,9 @@ s_time_t get_s_time_fixed(uint64_t at_tsc)
     const struct cpu_time *t = &this_cpu(cpu_time);
     uint64_t tsc, delta;
 
+    /* scale_delta() degenerates when the scale wasn't set yet. */
+    ASSERT(t->tsc_scale.mul_frac);
+
     if ( at_tsc )
         tsc = at_tsc;
     else
@@ -1728,6 +1731,20 @@ s_time_t get_s_time_fixed(uint64_t at_tsc)
 
 s_time_t get_s_time(void)
 {
+    /*
+     * Before the TSC scale is set, avoid returning constant 0 (or whatever
+     * this_cpu(cpu_time).stamp.local_stime is set to).  While the returned
+     * value is in no way representing time, it at least increases
+     * monotonically, thus avoiding e.g. waiting loops to degenerate to
+     * entirely infinite ones.
+     */
+    if ( unlikely(!this_cpu(cpu_time).tsc_scale.mul_frac) )
+    {
+        static s_time_t counter;
+
+        return arch_fetch_and_add(&counter, 1);
+    }
+
     return get_s_time_fixed(0);
 }
 
@@ -2681,6 +2698,22 @@ int __init init_xen_time(void)
     return 0;
 }
 
+/* BSP-only function to pre-set an approximate TSC scale. */
+void __init preset_tsc_scale(unsigned long freq)
+{
+    struct cpu_time *t = &this_cpu(cpu_time);
+
+    /*
+     * The incoming frequency is only approximate (nominal).  Increase it by
+     * 1% to make NOW() output rather a little too slow than too fast, thus
+     * avoiding a possible backwards jump once the final scale is set.
+     */
+    freq += DIV_ROUND_UP(freq, 100);
+
+    set_time_scale(&t->tsc_scale, freq);
+    t->stamp.local_tsc = boot_tsc_stamp;
+    NOW_good = true;
+}
 
 /* Early init function. */
 void __init early_time_init(void)
@@ -2698,6 +2731,9 @@ void __init early_time_init(void)
                    "TSC ADJUST set to %lx on boot CPU - clearing\n", tmp);
             wrmsrl(MSR_IA32_TSC_ADJUST, 0);
             boot_tsc_stamp -= tmp;
+
+            if ( t->stamp.local_tsc )
+                t->stamp.local_tsc -= tmp;
         }
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 15:11:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 15:11:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406104.1639517 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcB-0004Ct-Kw; Wed, 02 Sep 2026 15:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406104.1639517; Wed, 02 Sep 2026 15:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcB-0004Cl-I7; Wed, 02 Sep 2026 15:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1406104;
 Wed, 02 Sep 2026 15:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1mcA-0004Cf-I8
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 15:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcA-001wYG-2X
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcA-000X8E-1U
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=oNzuneeus3tjdAgsl5McPYOuDT7vJKYexm5R6wBg8Bg=; b=0Loddvnk0FxJ8Plrd/2Z9/fd3g
	4ZEaFlJjxjM4AOb+2m5it8DJPhptlzXv/uA37p64/PjyDntOzQSim+x00i6MuMLuFfn1TmPvXg7UE
	fFXrvB1Xn6vhmnLjKikpfCgik04qXPMvD2PigMSNtxVdnO+CMdhJ4CA0+5I6AHtN47P0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/time: CMOS RTC may run in binary mode
Message-Id: <E1x1mcA-000X8E-1U@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 15:11:02 +0000

commit 9d2bbfb79789e9bdfc7239ffca195d102c287559
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:11:50 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:11:50 2026 +0200

    x86/time: CMOS RTC may run in binary mode
    
    Indicating it would always use BCD mode is just wrong (and then the
    comment there said the opposite). All halfway recent (and really all 64-
    bit capable) systems having a CMOS RTC should properly indicate the mode
    in control register B.
    
    Make use of the flag, but provide a fallback mechanism in case people run
    into systems not matching the above assumption. Additionally, when binary
    mode is indicated and when "cmos-rtc-probe" is in use (but "cmos-rtc-bcd"
    isn't), probe whether the clock really runs in binary mode. (This probing,
    sadly, can take up to 10 seconds.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 docs/misc/xen-command-line.pandoc      |  8 ++++++
 xen/arch/x86/include/asm/mc146818rtc.h |  1 -
 xen/arch/x86/time.c                    | 51 +++++++++++++++++++++++++++++++++-
 3 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc
index 1c711fa980..95cc3312f1 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -339,6 +339,14 @@ parameter to "stable:socket".
 Specify the event count threshold for raising Corrected Machine Check
 Interrupts.  Specifying zero disables CMCI handling.
 
+### cmos-rtc-bcd (x86)
+> `= <boolean>`
+
+> Default: `false`
+
+Flag to indicate the CMOS Real Time Clock uses BCD mode irrespective of
+control register B indicating binary mode.
+
 ### cmos-rtc-probe (x86)
 > `= <boolean>`
 
diff --git a/xen/arch/x86/include/asm/mc146818rtc.h b/xen/arch/x86/include/asm/mc146818rtc.h
index 1a34512d29..2c02caba4d 100644
--- a/xen/arch/x86/include/asm/mc146818rtc.h
+++ b/xen/arch/x86/include/asm/mc146818rtc.h
@@ -96,7 +96,6 @@ bool is_cmos_port(unsigned int port, unsigned int bytes,
 
 #ifndef RTC_PORT
 #define RTC_PORT(x)	(0x70 + (x))
-#define RTC_ALWAYS_BCD	1	/* RTC operates in binary mode */
 #endif
 
 /*
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index bc0161f7c2..f35555f185 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1250,6 +1250,9 @@ mktime (unsigned int year, unsigned int mon,
         )*60 + sec; /* finally seconds */
 }
 
+static bool __ro_after_init opt_cmos_rtc_bcd;
+boolean_param("cmos-rtc-bcd", opt_cmos_rtc_bcd);
+
 struct rtc_time {
     unsigned int year, mon, day, hour, min, sec;
 };
@@ -1285,7 +1288,7 @@ static bool __get_cmos_time(struct rtc_time *rtc)
     if ( acpi_gbl_FADT.century && acpi_gbl_FADT.century < 0x80 )
         century = CMOS_READ(acpi_gbl_FADT.century);
 
-    bcd = RTC_ALWAYS_BCD || !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY);
+    bcd = opt_cmos_rtc_bcd || !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY);
 
     spin_unlock_irqrestore(&rtc_lock, flags);
 
@@ -1353,6 +1356,48 @@ static bool __init cmos_rtc_probe(void)
     return false;
 }
 
+static inline bool __init attr_const is_bcd(unsigned int x)
+{
+    return (x & 0xf) < 10 && (x >> 4) < 10;
+}
+
+static void __init cmos_rtc_probe_bcd(void)
+{
+    bool bcd;
+    unsigned long flags;
+
+    if ( opt_cmos_rtc_bcd )
+        return;
+
+    spin_lock_irqsave(&rtc_lock, flags);
+    bcd = !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY);
+    spin_unlock_irqrestore(&rtc_lock, flags);
+
+    if ( bcd )
+        return;
+
+    for ( unsigned int seclo = 0; ; )
+    {
+        struct rtc_time rtc;
+
+        if ( !__get_cmos_time(&rtc) ||
+             !is_bcd(rtc.sec) ||
+             !is_bcd(rtc.min) ||
+             !is_bcd(rtc.hour) ||
+             !is_bcd(rtc.day) ||
+             !is_bcd(rtc.mon) )
+            return;
+
+        if ( seclo > (rtc.sec & 0xf) )
+            break;
+
+        seclo = rtc.sec & 0xf;
+    }
+
+    printk(XENLOG_WARNING "CMOS RTC indicates binary mode but uses BCD\n");
+
+    opt_cmos_rtc_bcd = true;
+}
 
 static unsigned long cmos_rtc_read(void)
 {
@@ -1614,6 +1659,10 @@ static void __init probe_wallclock(void)
     if ( cmos_rtc_probe() )
     {
         wallclock_source = WALLCLOCK_CMOS;
+
+        if ( opt_cmos_rtc_probe )
+            cmos_rtc_probe_bcd();
+
         return;
     }
     if ( efi_enabled(EFI_RS) && efi_get_time() )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 15:11:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 15:11:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406105.1639520 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcM-0004Ej-Ly; Wed, 02 Sep 2026 15:11:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406105.1639520; Wed, 02 Sep 2026 15:11:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcM-0004Eb-JT; Wed, 02 Sep 2026 15:11:14 +0000
Received: by outflank-mailman (input) for mailman id 1406105;
 Wed, 02 Sep 2026 15:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1mcK-0004EU-Lo
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 15:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcK-001wYf-2u
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcK-000YN5-1x
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=G+KzCnScYU33fDHL/eDZqQWch9XwUDTpqoi2mSHrgm0=; b=LUn6sHz8qTMPkXcxRLa8ULGcXH
	4ZOkpkgf2/ezduPSQtuB2Q4h08ZWiPaaYuSFT5tIKyv6v7AuqAfpiCS8dsUnlAryAXTkT6Zaq2Gxf
	SGXyWaeUMXDN0ZaNf9I1aDl0lHemknTyPXCTSLcCgha2tPMd5iYx7IEWUqOeFxTpPf8Q=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] time: shorten year determination loop
Message-Id: <E1x1mcK-000YN5-1x@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 15:11:12 +0000

commit b244971a8b4d86a1c6ef3814b5c71c5ca74bebe1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:12:14 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:12:14 2026 +0200

    time: shorten year determination loop
    
    For dates very far into the future (the MC146818 RTC's century byte can go
    up to the 99th century), the present year-wise loop would become somewhat
    inefficient (taking perhaps several thousand iterations). Prefix that loop
    with a 400-year granular calculation (somewhat like the earlier loop does
    for dates in the past).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/common/time.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/xen/common/time.c b/xen/common/time.c
index 2b8c98e2de..0ddf65448d 100644
--- a/xen/common/time.c
+++ b/xen/common/time.c
@@ -29,6 +29,8 @@ bool __ro_after_init NOW_good;
 #define __isleap(year) \
   ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
 
+#define DAYS_IN_400_YEARS (365 * 303 + 366 * 97)
+
 /* How many days are in each month.  */
 static const unsigned short int __mon_lengths[2][12] = {
     /* Normal years.  */
@@ -59,7 +61,7 @@ struct tm gmtime(unsigned long t)
     while ( t & (1UL<<39) )
     {
         y -= 400;
-        t += ((unsigned long)(365 * 303 + 366 * 97)) * SECS_PER_DAY;
+        t += (unsigned long)DAYS_IN_400_YEARS * SECS_PER_DAY;
     }
     t &= (1UL << 40) - 1;
 #endif
@@ -73,6 +75,11 @@ struct tm gmtime(unsigned long t)
     tbuf.tm_sec = rem % 60;
     /* January 1, 1970 was a Thursday.  */
     tbuf.tm_wday = (4 + days) % 7;
+    if ( days >= DAYS_IN_400_YEARS )
+    {
+        y += (days / DAYS_IN_400_YEARS) * 400;
+        days %= DAYS_IN_400_YEARS;
+    }
     while ( days >= (rem = __isleap(y) ? 366 : 365) )
     {
         ++y;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 15:11:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 15:11:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406106.1639525 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcW-0004Gl-NT; Wed, 02 Sep 2026 15:11:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406106.1639525; Wed, 02 Sep 2026 15:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcW-0004Gd-Km; Wed, 02 Sep 2026 15:11:24 +0000
Received: by outflank-mailman (input) for mailman id 1406106;
 Wed, 02 Sep 2026 15:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1mcU-0004GV-PI
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 15:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcV-001wYj-02
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcU-000Zpa-2I
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=n/cFl1/iwt96KJSYOlmpnEGfPVauxFReTME6++xGIxU=; b=gu6n73+rs+Q0x2UxijRdbdDqgA
	FEMS51ayYBC6jTQE7YmOdrTWHge1zkUQaiwkVi/rrD5tTmxbJMRmtGKFfTldC2o/wclw8jikLTW4j
	mCmb8DEsdgQqFfdjwbXbAqRIMGT5MbmpEN3irzrNe/0iylapwC9SqkaLTWSOscUAtc3s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/vRTC: the use_timer field is a boolean one
Message-Id: <E1x1mcU-000Zpa-2I@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 15:11:22 +0000

commit dc2382d1a57921051d131ac3d7ae877f7b6383fc
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:12:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:12:53 2026 +0200

    x86/vRTC: the use_timer field is a boolean one
    
    ... and hence wants to be of bool type.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/rtc.c             | 6 +++---
 xen/arch/x86/include/asm/hvm/vpt.h | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 9a53188dac..78543ab87c 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -189,7 +189,7 @@ static void check_update_timer(RTCState *s)
     if (!(s->hw.cmos_data[RTC_REG_C] & RTC_UF) &&
             !(s->hw.cmos_data[RTC_REG_B] & RTC_SET))
     {
-        s->use_timer = 1;
+        s->use_timer = true;
         guest_usec = get_localtime_us(d) % USEC_PER_SEC;
         if (guest_usec >= (USEC_PER_SEC - 244))
         {
@@ -217,7 +217,7 @@ static void check_update_timer(RTCState *s)
         }
     }
     else
-        s->use_timer = 0;
+        s->use_timer = false;
 }
 
 static void cf_check rtc_update_timer(void *opaque)
@@ -683,7 +683,7 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
         break;
     case RTC_REG_A:
         ret = s->hw.cmos_data[s->hw.cmos_index];
-        if ((s->use_timer == 0) && update_in_progress(s))
+        if ( !s->use_timer && update_in_progress(s) )
             ret |= RTC_UIP;
         break;
     case RTC_REG_C:
diff --git a/xen/arch/x86/include/asm/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/vpt.h
index 24f0918280..2f6bd28a82 100644
--- a/xen/arch/x86/include/asm/hvm/vpt.h
+++ b/xen/arch/x86/include/asm/hvm/vpt.h
@@ -106,7 +106,9 @@ typedef struct RTCState {
     s_time_t check_ticks_since;
     int period;
     uint8_t pt_dead_ticks;
-    uint32_t use_timer;
+
+    bool use_timer;
+
     spinlock_t lock;
 } RTCState;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 15:11:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 15:11:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406107.1639529 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcg-0004Ig-P2; Wed, 02 Sep 2026 15:11:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406107.1639529; Wed, 02 Sep 2026 15:11:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcg-0004IY-MD; Wed, 02 Sep 2026 15:11:34 +0000
Received: by outflank-mailman (input) for mailman id 1406107;
 Wed, 02 Sep 2026 15:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1mce-0004IR-Su
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 15:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcf-001wYo-0O
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mce-000bFb-2f
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/YmCfek0YHygHgP//iQt0ruCr0W+XAzDwCVR9SMDFQM=; b=cALyHziQQx8CDufeo86dXUHJ8j
	t9MeOa8wK8tkiHhs+6nIVjgJggV5fpWVNCq2gJj9CRYKfHfUkoMRrHL85M1uhPio6ce8hBfbFBtAb
	XbzuvEQbhRSwaEJKzCq26rvdoBQuw7uTbI8Ggt2Kg0zeMv3H/H/51X290VV0LAgRyMSc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/vRTC: support century field
Message-Id: <E1x1mce-000bFb-2f@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 15:11:32 +0000

commit f2ff80877f6680023fdf29f229b7f612418e527e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:14:08 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:14:08 2026 +0200

    x86/vRTC: support century field
    
    Both ROMBIOS and SeaBIOS (with CONFIG_QEMU=y, as we build it) blindly
    assume availability of this field (at its conventional index 0x32); OVMF
    at least has code to inspect FADT. Hence we ought to have supported it
    virtually forever.
    
    As the index is beyond RTC_CMOS_SIZE, leverage the padding field in
    struct hvm_hw_rtc to hold its value. Update the field only when involved
    values are valid BCD century specifiers. Otherwise (for VMs migrated in
    from an older hypervisor) leave handling to the DM.
    
    This makes the Linux rtc-cmos driver report y3k compatibility.
    
    In the new rtc_check(), besides checking the new fields also check the
    pre-existing pad0 field.
    
    While extending xen-hvmctx.c:dump_rtc() also add RTC offset there.
    
    Fixes: 4ca161214355 ("[HVM] Move RTC emulation into the hypervisor")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 tools/libacpi/static_tables.c          |  6 ++-
 tools/misc/xen-hvmctx.c                |  2 +-
 xen/arch/x86/hvm/rtc.c                 | 86 ++++++++++++++++++++++++++++++----
 xen/arch/x86/include/asm/hvm/vpt.h     |  2 +
 xen/arch/x86/include/asm/mc146818rtc.h |  3 ++
 xen/include/public/arch-x86/hvm/save.h |  2 +
 6 files changed, 91 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/static_tables.c b/tools/libacpi/static_tables.c
index 715f46fee0..11cbeced64 100644
--- a/tools/libacpi/static_tables.c
+++ b/tools/libacpi/static_tables.c
@@ -33,6 +33,8 @@ struct acpi_20_facs Facs = {
 #define ACPI_PM_TMR_BLK_BIT_WIDTH           0x20
 #define ACPI_PM_TMR_BLK_BIT_OFFSET          0x00
 
+#define CMOS_CENTURY 0x32 /* Conventional index used also without ACPI */
+
 struct acpi_fadt Fadt = {
     .header = {
         .signature    = ACPI_FADT_SIGNATURE,
@@ -88,7 +90,9 @@ struct acpi_fadt Fadt = {
         .register_bit_width  = ACPI_PM_TMR_BLK_BIT_WIDTH,
         .register_bit_offset = ACPI_PM_TMR_BLK_BIT_OFFSET,
         .address             = ACPI_PM_TMR_BLK_ADDRESS_V1,
-    }
+    },
+
+    .century = CMOS_CENTURY,
 };
 
 struct acpi_20_rsdt Rsdt = {
diff --git a/tools/misc/xen-hvmctx.c b/tools/misc/xen-hvmctx.c
index ecb7f054be..69b22fe7a4 100644
--- a/tools/misc/xen-hvmctx.c
+++ b/tools/misc/xen-hvmctx.c
@@ -311,7 +311,7 @@ static void dump_rtc(void)
     printf("              0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x, index 0x%02x\n",
            r.cmos_data[8], r.cmos_data[9], r.cmos_data[10], r.cmos_data[11], 
            r.cmos_data[12], r.cmos_data[13], r.cmos_index);
-
+    printf("         century 0x%02x  offset %"PRId64"\n", r.century, r.rtc_offset);
 }
 
 static void dump_hpet(void)
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 78543ab87c..4e0d28d1ea 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -484,16 +484,27 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
         data &= 0x7f;
         s->hw.cmos_index = data;
         spin_unlock(&s->lock);
-        return (data < RTC_CMOS_SIZE);
+        return data < RTC_CMOS_SIZE || (s->has_century && data == RTC_CENTURY);
     }
 
-    if ( s->hw.cmos_index >= RTC_CMOS_SIZE )
+    switch ( s->hw.cmos_index )
     {
+    case 0 ... RTC_CMOS_SIZE - 1:
+        orig = s->hw.cmos_data[s->hw.cmos_index];
+        break;
+
+    case RTC_CENTURY:
+        if ( s->has_century )
+        {
+            orig = s->hw.century;
+            break;
+        }
+        fallthrough;
+    default:
         spin_unlock(&s->lock);
         return 0;
     }
 
-    orig = s->hw.cmos_data[s->hw.cmos_index];
     switch ( s->hw.cmos_index )
     {
     case RTC_SECONDS_ALARM:
@@ -509,6 +520,7 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
     case RTC_DAY_OF_MONTH:
     case RTC_MONTH:
     case RTC_YEAR:
+    case RTC_CENTURY:
         /* if in set mode, just write the register */
         if ( (s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
             s->hw.cmos_data[s->hw.cmos_index] = data;
@@ -517,7 +529,10 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
             /* Fetch the current time and update just this field. */
             s->current_tm = gmtime(get_localtime(d));
             rtc_copy_date(s);
-            s->hw.cmos_data[s->hw.cmos_index] = data;
+            if ( s->hw.cmos_index != RTC_CENTURY )
+                s->hw.cmos_data[s->hw.cmos_index] = data;
+            else
+                s->hw.century = data;
             rtc_set_time(s);
         }
         alarm_timer_update(s);
@@ -593,7 +608,16 @@ static void rtc_set_time(RTCState *s)
     tm->tm_wday = from_bcd(s, s->hw.cmos_data[RTC_DAY_OF_WEEK]);
     tm->tm_mday = from_bcd(s, s->hw.cmos_data[RTC_DAY_OF_MONTH]);
     tm->tm_mon = from_bcd(s, s->hw.cmos_data[RTC_MONTH]) - 1;
-    tm->tm_year = from_bcd(s, s->hw.cmos_data[RTC_YEAR]) + 100;
+    tm->tm_year = from_bcd(s, s->hw.cmos_data[RTC_YEAR]);
+    if ( s->has_century )
+    {
+        unsigned int century = s->hw.century;
+
+        BCD_TO_BIN(century);
+        tm->tm_year += century * 100 - epoch_year;
+    }
+    else
+        tm->tm_year += 100;
 
     after = mktime(get_year(tm->tm_year), tm->tm_mon + 1, tm->tm_mday,
                    tm->tm_hour, tm->tm_min, tm->tm_sec);
@@ -631,6 +655,12 @@ static void rtc_copy_date(RTCState *s)
     s->hw.cmos_data[RTC_DAY_OF_MONTH] = to_bcd(s, tm->tm_mday);
     s->hw.cmos_data[RTC_MONTH] = to_bcd(s, tm->tm_mon + 1);
     s->hw.cmos_data[RTC_YEAR] = to_bcd(s, tm->tm_year % 100);
+
+    if ( s->has_century )
+    {
+        s->hw.century = get_year(tm->tm_year) / 100;
+        BIN_TO_BCD(s->hw.century);
+    }
 }
 
 static int update_in_progress(RTCState *s)
@@ -658,7 +688,8 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
 
     spin_lock(&s->lock);
 
-    if ( s->hw.cmos_index >= RTC_CMOS_SIZE )
+    if ( s->hw.cmos_index >= RTC_CMOS_SIZE &&
+         (!s->has_century || s->hw.cmos_index != RTC_CENTURY) )
     {
         spin_unlock(&s->lock);
         return false;
@@ -673,13 +704,17 @@ static bool rtc_ioport_read(RTCState *s, uint32_t *val)
     case RTC_DAY_OF_MONTH:
     case RTC_MONTH:
     case RTC_YEAR:
+    case RTC_CENTURY:
         /* if not in set mode, adjust cmos before reading*/
         if (!(s->hw.cmos_data[RTC_REG_B] & RTC_SET))
         {
             s->current_tm = gmtime(get_localtime(d));
             rtc_copy_date(s);
         }
-        ret = s->hw.cmos_data[s->hw.cmos_index];
+        if ( s->hw.cmos_index != RTC_CENTURY )
+            ret = s->hw.cmos_data[s->hw.cmos_index];
+        else
+            ret = s->hw.century;
         break;
     case RTC_REG_A:
         ret = s->hw.cmos_data[s->hw.cmos_index];
@@ -769,6 +804,32 @@ static int cf_check rtc_save(struct vcpu *v, hvm_domain_context_t *h)
     return rc;
 }
 
+static int cf_check rtc_check(const struct domain *d, hvm_domain_context_t *h)
+{
+    const struct hvm_save_descriptor *desc =
+        (const struct hvm_save_descriptor *)&h->data[h->cur];
+    struct hvm_hw_rtc s;
+
+    if ( !has_vrtc(d) )
+        return -ENODEV;
+
+    if ( hvm_load_entry_zeroextend(RTC, h, &s) != 0 )
+        return -ENODATA;
+
+    if ( s.pad0 )
+        return -EINVAL;
+
+    for ( unsigned int i = 0; i < ARRAY_SIZE(s.pad1); ++i )
+        if ( s.pad1[i] )
+            return -EINVAL;
+
+    if ( desc->length >= endof_field(struct hvm_hw_rtc, century) &&
+         ((s.century & 0xf) >= 10 || (s.century >> 4) >= 10) )
+        return -EINVAL;
+
+    return 0;
+}
+
 /* Reload the hardware state from a saved domain */
 static int cf_check rtc_load(struct domain *d, hvm_domain_context_t *h)
 {
@@ -802,12 +863,15 @@ static int cf_check rtc_load(struct domain *d, hvm_domain_context_t *h)
     check_update_timer(s);
     alarm_timer_update(s);
 
+    if ( !s->hw.century )
+        s->has_century = false;
+
     spin_unlock(&s->lock);
 
     return 0;
 }
 
-HVM_REGISTER_SAVE_RESTORE(RTC, rtc_save, NULL, rtc_load, 1, HVMSR_PER_DOM);
+HVM_REGISTER_SAVE_RESTORE(RTC, rtc_save, rtc_check, rtc_load, 1, HVMSR_PER_DOM);
 
 void rtc_reset(struct domain *d)
 {
@@ -882,6 +946,12 @@ void rtc_init(struct domain *d)
     s->hw.cmos_data[RTC_REG_C] = 0;
     s->hw.cmos_data[RTC_REG_D] = RTC_VRT;
 
+    /*
+     * By default we make the century byte available, unless an incoming save
+     * record says otherwise.
+     */
+    s->has_century = true;
+
     s->current_tm = gmtime(get_localtime(d));
     s->start_time = NOW();
 
diff --git a/xen/arch/x86/include/asm/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/vpt.h
index 2f6bd28a82..f6bcec8090 100644
--- a/xen/arch/x86/include/asm/hvm/vpt.h
+++ b/xen/arch/x86/include/asm/hvm/vpt.h
@@ -109,6 +109,8 @@ typedef struct RTCState {
 
     bool use_timer;
 
+    bool has_century;
+
     spinlock_t lock;
 } RTCState;
 
diff --git a/xen/arch/x86/include/asm/mc146818rtc.h b/xen/arch/x86/include/asm/mc146818rtc.h
index 2c02caba4d..c77c5bc216 100644
--- a/xen/arch/x86/include/asm/mc146818rtc.h
+++ b/xen/arch/x86/include/asm/mc146818rtc.h
@@ -37,6 +37,9 @@ bool is_cmos_port(unsigned int port, unsigned int bytes,
 #define RTC_REG_C               12
 #define RTC_REG_D               13
 
+/* Conventional index used without (and typically also with) ACPI. */
+#define RTC_CENTURY             0x32
+
 /**********************************************************************
  * register details
  **********************************************************************/
diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h
index 9c4bfc7ebd..44d7924777 100644
--- a/xen/include/public/arch-x86/hvm/save.h
+++ b/xen/include/public/arch-x86/hvm/save.h
@@ -488,6 +488,8 @@ struct hvm_hw_rtc {
     uint8_t pad0;
     /* RTC offset from host time */
     int64_t rtc_offset;
+    uint8_t century;
+    uint8_t pad1[7];
 };
 
 DECLARE_HVM_SAVE_TYPE(RTC, 11, struct hvm_hw_rtc);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 15:11:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 15:11:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406108.1639533 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcq-0004Lc-Rv; Wed, 02 Sep 2026 15:11:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406108.1639533; Wed, 02 Sep 2026 15:11:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1mcq-0004LU-P0; Wed, 02 Sep 2026 15:11:44 +0000
Received: by outflank-mailman (input) for mailman id 1406108;
 Wed, 02 Sep 2026 15:11:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1mcp-0004LM-3p
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 15:11:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcp-001wYu-16
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcp-000dFT-05
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=7/R+XgDoP86gzOpQ08ccC1Mtu9fxGJihIU3q0bKGC00=; b=PIoXmEG78bIeRVZtGaGWoZlitt
	L+2otKhcDgSnJHGeLnBimT8s+wbx0OsQD6nC52bk0JHVgKNQsDvCir0d5hbt8C/u5FCHZqTP8Kh6b
	K8OW1Wlz6lbkfzimUX4mPGK/F4uHfJxwN2A6qWtqLs1EHtmhICGHYrpCU50vIUi2ir90=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/CPU: re-arrange tail of early_cpu_init()
Message-Id: <E1x1mcp-000dFT-05@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 15:11:43 +0000

commit 11f8d55624d122320f50b8a853d3bedfaeaed271
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:14:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:14:55 2026 +0200

    x86/CPU: re-arrange tail of early_cpu_init()
    
    Some early setup doesn't need re-doing after ucode load. Move the call to
    initialize_cpu_data() slightly up and add a conditional return point.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/cpu/common.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index 771ec2cf86..4be86e1f7b 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -432,10 +432,18 @@ void __init early_cpu_init(bool verbose)
 		paddr_bits -= (ebx >> 6) & 0x3f;
 	}
 
+	initialize_cpu_data(0);
+
+	if (!verbose)
+		return;
+
+	/*
+	 * Work which doesn't need repeating after microcode load goes below
+	 * here.
+	 */
+
 	if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
 		park_offline_cpus = opt_mce;
-
-	initialize_cpu_data(0);
 }
 
 void reset_cpuinfo(struct cpuinfo_x86 *c, bool keep_basic)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 15:11:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 15:11:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406110.1639538 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1md0-0004Nc-TS; Wed, 02 Sep 2026 15:11:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406110.1639538; Wed, 02 Sep 2026 15:11:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1md0-0004NU-QS; Wed, 02 Sep 2026 15:11:54 +0000
Received: by outflank-mailman (input) for mailman id 1406110;
 Wed, 02 Sep 2026 15:11:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1mcz-0004NO-7h
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 15:11:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcz-001wZ1-1V
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1mcz-000elK-0Y
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 15:11:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=lkz/Mvz5bFz6AVVJw0z7QNU+rnv7LXMuaUos2dcZxVw=; b=xVclfTXICPg95/341njeIxGJPl
	x6VmCnufkkCVUsn6nav8DZulrsCm0DXdh+iL8ZKaT2EWXK174SfPsmxvSbO7JFwGKdOMv9jcNnv5K
	sNdfNy2n5yfYxx0i8ZrB2iCFTlrNgYvjpgdLrritTAViZSfnyWHNXd87NeyBuuM3eVMY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/time: avoid early uses of NOW() to return zero
Message-Id: <E1x1mcz-000elK-0Y@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 15:11:53 +0000

commit e85f3521a473b6c3efd712572438ccabb3a577a0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 15:15:46 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 2 15:15:46 2026 +0200

    x86/time: avoid early uses of NOW() to return zero
    
    Waiting loops like the one in flush_command_buffer() will degenerate to
    infinite ones when used early enough for NOW() to still return constant
    zero. Make sure the returned value at least monotonically increases. When
    available, use nominal frequency values as initial approximation.
    
    Do this only in get_s_time(), as producing a sane value in
    get_s_time_fixed() for non-zero inputs won't be reasonably possible.
    Put an assertion there.
    
    Reported-by: Roger Pau Monné <roger.pau@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/cpu/common.c            | 34 ++++++++++++++++++++++++++++++++++
 xen/arch/x86/cpu/intel.c             |  4 ++--
 xen/arch/x86/include/asm/processor.h |  3 +++
 xen/arch/x86/include/asm/time.h      |  1 +
 xen/arch/x86/time.c                  | 36 ++++++++++++++++++++++++++++++++++++
 5 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index 4be86e1f7b..d045ed6b41 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -19,6 +19,7 @@
 #include <asm/random.h>
 #include <asm/setup.h>
 #include <asm/shstk.h>
+#include <asm/time.h>
 #include <asm/xstate.h>
 
 #include <public/sysctl.h>
@@ -444,6 +445,39 @@ void __init early_cpu_init(bool verbose)
 
 	if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
 		park_offline_cpus = opt_mce;
+
+	/*
+	 * If nominal freq isn't available, use highest, thus causing NOW()
+	 * output to move more slowly.  See preset_tsc_scale().
+	 */
+	if (c->cpuid_level >= 0x15) {
+		cpuid(0x15, &eax, &ebx, &ecx, &edx);
+
+		if (ecx && ebx && eax)
+			preset_tsc_scale(DIV_ROUND_UP(ecx * 1UL * ebx, eax));
+		else if (c->cpuid_level >= 0x16) {
+			/* Assume CPU base freq ≈ TSC freq. */
+			cpuid(0x16, &eax, &ebx, &ecx, &edx);
+			if (eax)
+				preset_tsc_scale(eax * 1000000UL);
+			else if (ebx)
+				preset_tsc_scale(ebx * 1000000UL);
+		}
+	} else if (c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) {
+		unsigned int nom_mhz = 0, hi_mhz = 0;
+
+		amd_process_freq(c, NULL, &nom_mhz, &hi_mhz);
+		if (nom_mhz)
+			preset_tsc_scale(nom_mhz * 1000000UL);
+		else if (hi_mhz)
+			preset_tsc_scale(hi_mhz * 1000000UL);
+	} else if (c->vendor & X86_VENDOR_INTEL) {
+		unsigned int hi_mhz = 0;
+
+		intel_process_freq(c, NULL, &hi_mhz);
+		if (hi_mhz)
+			preset_tsc_scale(hi_mhz * 1000000UL);
+	}
 }
 
 void reset_cpuinfo(struct cpuinfo_x86 *c, bool keep_basic)
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 5c07140695..1006126bc3 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -476,8 +476,8 @@ static int num_cpu_cores(struct cpuinfo_x86 *c)
 		return 1;
 }
 
-static void intel_process_freq(const struct cpuinfo_x86 *c,
-                               unsigned int *min_mhz, unsigned int *max_mhz)
+void intel_process_freq(const struct cpuinfo_x86 *c,
+                        unsigned int *min_mhz, unsigned int *max_mhz)
 {
     uint64_t msrval;
     uint8_t max_ratio, min_ratio;
diff --git a/xen/arch/x86/include/asm/processor.h b/xen/arch/x86/include/asm/processor.h
index 4b200428be..4b17e13a97 100644
--- a/xen/arch/x86/include/asm/processor.h
+++ b/xen/arch/x86/include/asm/processor.h
@@ -417,6 +417,9 @@ static inline uint8_t get_cpu_family(uint32_t raw, uint8_t *model,
     return fam;
 }
 
+void intel_process_freq(const struct cpuinfo_x86 *c,
+                        unsigned int *min_mhz, unsigned int *max_mhz);
+
 #ifdef CONFIG_INTEL
 extern int8_t opt_tsx;
 extern bool rtm_disabled;
diff --git a/xen/arch/x86/include/asm/time.h b/xen/arch/x86/include/asm/time.h
index ed763ebc1b..6c8f0fe58c 100644
--- a/xen/arch/x86/include/asm/time.h
+++ b/xen/arch/x86/include/asm/time.h
@@ -23,6 +23,7 @@ mktime (unsigned int year, unsigned int mon,
 int time_suspend(void);
 int time_resume(void);
 
+void preset_tsc_scale(unsigned long freq);
 void init_percpu_time(void);
 void time_latch_stamps(void);
 
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index f35555f185..f37fddc61e 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1713,6 +1713,9 @@ s_time_t get_s_time_fixed(uint64_t at_tsc)
     const struct cpu_time *t = &this_cpu(cpu_time);
     uint64_t tsc, delta;
 
+    /* scale_delta() degenerates when the scale wasn't set yet. */
+    ASSERT(t->tsc_scale.mul_frac);
+
     if ( at_tsc )
         tsc = at_tsc;
     else
@@ -1728,6 +1731,20 @@ s_time_t get_s_time_fixed(uint64_t at_tsc)
 
 s_time_t get_s_time(void)
 {
+    /*
+     * Before the TSC scale is set, avoid returning constant 0 (or whatever
+     * this_cpu(cpu_time).stamp.local_stime is set to).  While the returned
+     * value is in no way representing time, it at least increases
+     * monotonically, thus avoiding e.g. waiting loops to degenerate to
+     * entirely infinite ones.
+     */
+    if ( unlikely(!this_cpu(cpu_time).tsc_scale.mul_frac) )
+    {
+        static s_time_t counter;
+
+        return arch_fetch_and_add(&counter, 1);
+    }
+
     return get_s_time_fixed(0);
 }
 
@@ -2681,6 +2698,22 @@ int __init init_xen_time(void)
     return 0;
 }
 
+/* BSP-only function to pre-set an approximate TSC scale. */
+void __init preset_tsc_scale(unsigned long freq)
+{
+    struct cpu_time *t = &this_cpu(cpu_time);
+
+    /*
+     * The incoming frequency is only approximate (nominal).  Increase it by
+     * 1% to make NOW() output rather a little too slow than too fast, thus
+     * avoiding a possible backwards jump once the final scale is set.
+     */
+    freq += DIV_ROUND_UP(freq, 100);
+
+    set_time_scale(&t->tsc_scale, freq);
+    t->stamp.local_tsc = boot_tsc_stamp;
+    NOW_good = true;
+}
 
 /* Early init function. */
 void __init early_time_init(void)
@@ -2698,6 +2731,9 @@ void __init early_time_init(void)
                    "TSC ADJUST set to %lx on boot CPU - clearing\n", tmp);
             wrmsrl(MSR_IA32_TSC_ADJUST, 0);
             boot_tsc_stamp -= tmp;
+
+            if ( t->stamp.local_tsc )
+                t->stamp.local_tsc -= tmp;
         }
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 20:55:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 20:55:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406234.1639598 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rz5-0004Ab-LK; Wed, 02 Sep 2026 20:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406234.1639598; Wed, 02 Sep 2026 20:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rz5-0004AR-I2; Wed, 02 Sep 2026 20:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1406234;
 Wed, 02 Sep 2026 20:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1rz4-0004AL-8K
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 20:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rz4-0023f8-0d
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rz3-002BnU-2s
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ZRdKZOPl2ughRlILaYPpGKIeBG3sKgtCExdZ8LwFpYI=; b=jPpQtWZN/yDqt6HpHgjkIk9csH
	XnA+/CqsVT1Bum6dau1M+FjQTKrZgRR3Cx15wfiJijb3P42YH621XqZg8Rc1Q5545BO0Ol+Y3E8U7
	Cvi8GD5KYjqb9HbNH1S+++wnuIwNCDAP4LvyvdpGo1XTnMS1Ip5gtW/2119cH4+LhSU4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] arm/bitops: Drop unused ADDR macros
Message-Id: <E1x1rz3-002BnU-2s@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 20:55:01 +0000

commit 9b24af44e592ed784af08e86aaaa74b0dc0c44ea
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 12:31:13 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    arm/bitops: Drop unused ADDR macros
    
    These are unused and do not want to gain new users.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/arm/include/asm/bitops.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/arch/arm/include/asm/bitops.h b/xen/arch/arm/include/asm/bitops.h
index 60686a3a55..52131892b1 100644
--- a/xen/arch/arm/include/asm/bitops.h
+++ b/xen/arch/arm/include/asm/bitops.h
@@ -22,9 +22,6 @@
 #define __set_bit(n,p)            set_bit(n,p)
 #define __clear_bit(n,p)          clear_bit(n,p)
 
-#define ADDR (*(volatile int *) addr)
-#define CONST_ADDR (*(const volatile int *) addr)
-
 #if defined(CONFIG_ARM_32)
 # include <asm/arm32/bitops.h>
 #elif defined(CONFIG_ARM_64)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 20:55:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 20:55:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406235.1639602 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rzE-0004CE-M3; Wed, 02 Sep 2026 20:55:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406235.1639602; Wed, 02 Sep 2026 20:55:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rzE-0004C6-JM; Wed, 02 Sep 2026 20:55:12 +0000
Received: by outflank-mailman (input) for mailman id 1406235;
 Wed, 02 Sep 2026 20:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1rzE-0004C0-2l
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 20:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rzE-0023fV-10
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rzE-002FWI-04
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2i3XKOfgx5l4GUQUDVlWN9RnY5budSfhJlCT65FEJ8c=; b=4U05F+TAVsN9db+IlKTwAy9aN6
	C/aLYRwfXIhZMizemBlAapJvz+eN2Y4O+0Ajm1KfGkrxgqqTAOB6eVqxkhYIgdHXYOnvIykVZZ0mp
	UF0ORACzdOEQurqv2pqeWyTg9X/ALNuP7OixBfdgZXcs1Pv1elM0WW5Uy+g2WjcUSWNU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/bitops: Remove CONST_ADDR
Message-Id: <E1x1rzE-002FWI-04@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 20:55:12 +0000

commit cdeace021b56ecf98914f18ec355df07fd517c77
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 12:32:42 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    x86/bitops: Remove CONST_ADDR
    
    All this does is obfuscate the usage sites.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/x86/include/asm/bitops.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index 69ffed510c..66e2b522d5 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -18,7 +18,6 @@
  */
 
 #define ADDR (*(volatile int *) addr)
-#define CONST_ADDR (*(const volatile int *) addr)
 
 /**
  * set_bit - Atomically set a bit in memory
@@ -285,7 +284,9 @@ static inline int variable_test_bit(int nr, const volatile void *addr)
     asm volatile ( "btl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit)
-                   : [addr] "m" (CONST_ADDR), [nr] "Ir" (nr) : "memory" );
+                   : [addr] "m" (*(const volatile int *)addr),
+                     [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 20:55:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 20:55:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406236.1639605 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rzO-0004FI-NR; Wed, 02 Sep 2026 20:55:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406236.1639605; Wed, 02 Sep 2026 20:55:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rzO-0004FA-Ku; Wed, 02 Sep 2026 20:55:22 +0000
Received: by outflank-mailman (input) for mailman id 1406236;
 Wed, 02 Sep 2026 20:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1rzO-0004F4-7d
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 20:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rzO-0023fc-1S
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rzO-002JEx-0S
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=QZ6+FixrGDh+fWEkKbc40d6AcpYMFoNwS5AsvCLjNqE=; b=XsynondaOIW0LbPOMtVnv/Rrm2
	pKB0v1FxZsn+PcU8694MJLomOG5xKKIpg4vx0e1oBbJr1I57vtDhgTjcgNUZr1n+8RD7g6UMQq7oj
	HkfsANSFhfO6sZinHGS0nw1jwkWjghDBqSywH7+aqRMJPGBTcdvfnlrNBu/7lGP14bLA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/bitops: Remove ADDR
Message-Id: <E1x1rzO-002JEx-0S@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 20:55:22 +0000

commit cfad3bc123227f3588fdff1711fb443845d6d03f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 12:36:17 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    x86/bitops: Remove ADDR
    
    All this does is obfuscate the usage sites.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 docs/misra/rules.rst              |  3 ++-
 xen/arch/x86/include/asm/bitops.h | 34 +++++++++++++++++++++-------------
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index b3e929307d..b174add811 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -212,7 +212,8 @@ maintainers if you want to suggest a change.
            static inline void set_bit(int nr, volatile void *addr)
            {
                asm volatile ( "lock btsl %1,%0"
-                              : "+m" (ADDR) : "Ir" (nr) : "memory");
+                              : "+m" (*(volatile int *)addr)
+                              : "Ir" (nr) : "memory" );
            }
            #define set_bit(nr, addr) ({                            \
                if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index 66e2b522d5..b806002a96 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -10,15 +10,11 @@
 #include <asm/cpufeatureset.h>
 
 /*
- * We specify the memory operand as both input and output because the memory
- * operand is both read from and written to. Since the operand is in fact a
- * word array, we also specify "memory" in the clobbers list to indicate that
- * words other than the one directly addressed by the memory operand may be
- * modified.
+ * Since the operand is in fact a word array, we also specify "memory"
+ * in the clobbers list to indicate that words other than the one
+ * directly addressed by the memory operand may be modified.
  */
 
-#define ADDR (*(volatile int *) addr)
-
 /**
  * set_bit - Atomically set a bit in memory
  * @nr: the bit to set
@@ -32,7 +28,9 @@
 static inline void set_bit(int nr, volatile void *addr)
 {
     asm volatile ( "lock btsl %1,%0"
-                   : "+m" (ADDR) : "Ir" (nr) : "memory");
+                   : "+m" (*(volatile int *)addr)
+                   : "Ir" (nr)
+                   : "memory" );
 }
 #define set_bit(nr, addr) ({                            \
     if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
@@ -73,7 +71,9 @@ static inline void constant_set_bit(int nr, void *addr)
 static inline void clear_bit(int nr, volatile void *addr)
 {
     asm volatile ( "lock btrl %1,%0"
-                   : "+m" (ADDR) : "Ir" (nr) : "memory");
+                   : "+m" (*(volatile int *)addr)
+                   : "Ir" (nr)
+                   : "memory" );
 }
 #define clear_bit(nr, addr) ({                          \
     if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
@@ -140,7 +140,9 @@ static inline void constant_change_bit(int nr, void *addr)
 static inline void change_bit(int nr, volatile void *addr)
 {
     asm volatile ( "lock btcl %1,%0"
-                    : "+m" (ADDR) : "Ir" (nr) : "memory");
+                   : "+m" (*(volatile int *)addr)
+                   : "Ir" (nr)
+                   : "memory" );
 }
 #define change_bit(nr, addr) ({                         \
     if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
@@ -162,7 +164,9 @@ static inline int test_and_set_bit(int nr, volatile void *addr)
     asm volatile ( "lock btsl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -208,7 +212,9 @@ static inline int test_and_clear_bit(int nr, volatile void *addr)
     asm volatile ( "lock btrl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -268,7 +274,9 @@ static inline int test_and_change_bit(int nr, volatile void *addr)
     asm volatile ( "lock btcl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 02 20:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Sep 2026 20:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406237.1639609 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rzZ-0004IO-P1; Wed, 02 Sep 2026 20:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406237.1639609; Wed, 02 Sep 2026 20:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x1rzZ-0004IG-MN; Wed, 02 Sep 2026 20:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1406237;
 Wed, 02 Sep 2026 20:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x1rzY-0004I8-Bb
 for xen-changelog@lists.xenproject.org; Wed, 02 Sep 2026 20:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rzY-0023fi-1r
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x1rzY-002MpV-0q
 for xen-changelog@lists.xenproject.org;
 Wed, 02 Sep 2026 20:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5C/lCuJA/qehE7qKSyvTiW3uoPVhS/1c2M2JHKN8ixs=; b=4TK8VfswW7k1gN/tO/W6HupjYH
	hkHILZZLk3f3V8hYAg7K5WGLsLNh30Wz/I/KX/9dV+PiEOUtA8SXc4sLMLYrOhfprtxNvjaFimQHa
	epbLCNvv8atKE4XR+vvq5A80q82Z3t86H/QVlnJ/ggmk+dzLtXsSpg0kRUAgeBTtmeOU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/bitops: don't cast away volatile-ness
Message-Id: <E1x1rzY-002MpV-0q@xenbits.xenproject.org>
Date: Wed, 02 Sep 2026 20:55:32 +0000

commit d5d126a225e78071fbb5db126744bc2a36d511df
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 08:30:49 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    x86/bitops: don't cast away volatile-ness
    
    Doing so, besides being a bad idea in general, violates Misra rule 11.8.
    
    No functional change intended.
    
    Fixes: f1879b2c2584 ("xen: introduce generic non-atomic test_*bit()")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/x86/include/asm/bitops.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index b806002a96..557cee03ba 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -191,7 +191,9 @@ static inline int arch__test_and_set_bit(int nr, volatile void *addr)
     asm volatile ( "btsl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -239,7 +241,9 @@ static inline int arch__test_and_clear_bit(int nr, volatile void *addr)
     asm volatile ( "btrl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -253,7 +257,9 @@ static inline int arch__test_and_change_bit(int nr, volatile void *addr)
     asm volatile ( "btcl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 06:00:18 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 06:00:18 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406385.1639688 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Uf-0000H8-Mw; Thu, 03 Sep 2026 06:00:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406385.1639688; Thu, 03 Sep 2026 06:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Uf-0000Gy-HZ; Thu, 03 Sep 2026 06:00:13 +0000
Received: by outflank-mailman (input) for mailman id 1406385;
 Thu, 03 Sep 2026 06:00:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x20UU-0007my-VN
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 06:00:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20UU-003QXk-1c
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20UU-000WLX-0Y
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=bSbeuMooVAVOMg8RSgfXVAcFL3SR73VnuYCR+oCDVrc=; b=px9ZSAclkOWvlWRpNRHlpQPOhq
	8pmOIIMAfAtAMwp++ljargfw3T0paEUvbMhi/NXccnVze5ujb88vHjU7dRVA8peTCV2z9dZ4dsQ3i
	vxvtMEqfCSUKFolmHle+wI3aFrInpRLnMWG2VTlhUqUDmfhriUfJiRmqqHszzpELtL/k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] arm/bitops: Drop unused ADDR macros
Message-Id: <E1x20UU-000WLX-0Y@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 06:00:02 +0000

commit 9b24af44e592ed784af08e86aaaa74b0dc0c44ea
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 12:31:13 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    arm/bitops: Drop unused ADDR macros
    
    These are unused and do not want to gain new users.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/arm/include/asm/bitops.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/arch/arm/include/asm/bitops.h b/xen/arch/arm/include/asm/bitops.h
index 60686a3a55..52131892b1 100644
--- a/xen/arch/arm/include/asm/bitops.h
+++ b/xen/arch/arm/include/asm/bitops.h
@@ -22,9 +22,6 @@
 #define __set_bit(n,p)            set_bit(n,p)
 #define __clear_bit(n,p)          clear_bit(n,p)
 
-#define ADDR (*(volatile int *) addr)
-#define CONST_ADDR (*(const volatile int *) addr)
-
 #if defined(CONFIG_ARM_32)
 # include <asm/arm32/bitops.h>
 #elif defined(CONFIG_ARM_64)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 06:00:18 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 06:00:18 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406386.1639692 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Uf-0000HS-O5; Thu, 03 Sep 2026 06:00:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406386.1639692; Thu, 03 Sep 2026 06:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Uf-0000H6-Ia; Thu, 03 Sep 2026 06:00:13 +0000
Received: by outflank-mailman (input) for mailman id 1406386;
 Thu, 03 Sep 2026 06:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x20Ue-0000Gr-Cy
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 06:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20Ue-003QXq-20
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20Ue-000X7o-10
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=lsFS7TyKKhn4fW6s0kZjA+rvGFCmFE+EDmtBiA7MFps=; b=nhJP6qEuTviMu4k2vFhGB66Mn7
	aOf3tongxCEfEGWRKcWRHwXNva27H4MGdkZdZ7pxSF6lC1jrTG1k+1AixvTQUkldUswXMU4XxD8mk
	3Hjx7Lv5qOsc9PJJjuTD+gWjvh5uo48qjrRsgqO/hgqFftaSEUlFv9IfdTcqvm2Acbt0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/bitops: Remove CONST_ADDR
Message-Id: <E1x20Ue-000X7o-10@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 06:00:12 +0000

commit cdeace021b56ecf98914f18ec355df07fd517c77
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 12:32:42 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    x86/bitops: Remove CONST_ADDR
    
    All this does is obfuscate the usage sites.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/x86/include/asm/bitops.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index 69ffed510c..66e2b522d5 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -18,7 +18,6 @@
  */
 
 #define ADDR (*(volatile int *) addr)
-#define CONST_ADDR (*(const volatile int *) addr)
 
 /**
  * set_bit - Atomically set a bit in memory
@@ -285,7 +284,9 @@ static inline int variable_test_bit(int nr, const volatile void *addr)
     asm volatile ( "btl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit)
-                   : [addr] "m" (CONST_ADDR), [nr] "Ir" (nr) : "memory" );
+                   : [addr] "m" (*(const volatile int *)addr),
+                     [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 06:00:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 06:00:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406387.1639693 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Up-0000KA-Md; Thu, 03 Sep 2026 06:00:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406387.1639693; Thu, 03 Sep 2026 06:00:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Up-0000K0-Jr; Thu, 03 Sep 2026 06:00:23 +0000
Received: by outflank-mailman (input) for mailman id 1406387;
 Thu, 03 Sep 2026 06:00:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x20Uo-0000Jk-GV
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 06:00:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20Uo-003QYD-2N
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20Uo-000Xyp-1P
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PmQ0jDPZ3U5Aa8uavbM1gRoBXooRpDLcUMmBwVYrdRk=; b=5TGtwMFEo8xBvFUn34uzva/utM
	rWnTKn7JVTYtUhLqR0SLgWWkuMeCvquyPZ12IDwlF8lLR9RMdmDdD7HTywmaEJnRCFsHUqz8aB0HS
	4Gw5Gzm0HHtcWH4HpfoQslWox08box2JtTWm+5PfKsFS6wm4JYadJ00G9f+9mvvWJsmk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/bitops: Remove ADDR
Message-Id: <E1x20Uo-000Xyp-1P@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 06:00:22 +0000

commit cfad3bc123227f3588fdff1711fb443845d6d03f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 12:36:17 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    x86/bitops: Remove ADDR
    
    All this does is obfuscate the usage sites.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 docs/misra/rules.rst              |  3 ++-
 xen/arch/x86/include/asm/bitops.h | 34 +++++++++++++++++++++-------------
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index b3e929307d..b174add811 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -212,7 +212,8 @@ maintainers if you want to suggest a change.
            static inline void set_bit(int nr, volatile void *addr)
            {
                asm volatile ( "lock btsl %1,%0"
-                              : "+m" (ADDR) : "Ir" (nr) : "memory");
+                              : "+m" (*(volatile int *)addr)
+                              : "Ir" (nr) : "memory" );
            }
            #define set_bit(nr, addr) ({                            \
                if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index 66e2b522d5..b806002a96 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -10,15 +10,11 @@
 #include <asm/cpufeatureset.h>
 
 /*
- * We specify the memory operand as both input and output because the memory
- * operand is both read from and written to. Since the operand is in fact a
- * word array, we also specify "memory" in the clobbers list to indicate that
- * words other than the one directly addressed by the memory operand may be
- * modified.
+ * Since the operand is in fact a word array, we also specify "memory"
+ * in the clobbers list to indicate that words other than the one
+ * directly addressed by the memory operand may be modified.
  */
 
-#define ADDR (*(volatile int *) addr)
-
 /**
  * set_bit - Atomically set a bit in memory
  * @nr: the bit to set
@@ -32,7 +28,9 @@
 static inline void set_bit(int nr, volatile void *addr)
 {
     asm volatile ( "lock btsl %1,%0"
-                   : "+m" (ADDR) : "Ir" (nr) : "memory");
+                   : "+m" (*(volatile int *)addr)
+                   : "Ir" (nr)
+                   : "memory" );
 }
 #define set_bit(nr, addr) ({                            \
     if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
@@ -73,7 +71,9 @@ static inline void constant_set_bit(int nr, void *addr)
 static inline void clear_bit(int nr, volatile void *addr)
 {
     asm volatile ( "lock btrl %1,%0"
-                   : "+m" (ADDR) : "Ir" (nr) : "memory");
+                   : "+m" (*(volatile int *)addr)
+                   : "Ir" (nr)
+                   : "memory" );
 }
 #define clear_bit(nr, addr) ({                          \
     if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
@@ -140,7 +140,9 @@ static inline void constant_change_bit(int nr, void *addr)
 static inline void change_bit(int nr, volatile void *addr)
 {
     asm volatile ( "lock btcl %1,%0"
-                    : "+m" (ADDR) : "Ir" (nr) : "memory");
+                   : "+m" (*(volatile int *)addr)
+                   : "Ir" (nr)
+                   : "memory" );
 }
 #define change_bit(nr, addr) ({                         \
     if ( bitop_bad_size(addr) ) __bitop_bad_size();     \
@@ -162,7 +164,9 @@ static inline int test_and_set_bit(int nr, volatile void *addr)
     asm volatile ( "lock btsl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -208,7 +212,9 @@ static inline int test_and_clear_bit(int nr, volatile void *addr)
     asm volatile ( "lock btrl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -268,7 +274,9 @@ static inline int test_and_change_bit(int nr, volatile void *addr)
     asm volatile ( "lock btcl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (ADDR) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 06:00:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 06:00:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406388.1639698 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Uz-0000MU-No; Thu, 03 Sep 2026 06:00:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406388.1639698; Thu, 03 Sep 2026 06:00:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x20Uz-0000MM-LB; Thu, 03 Sep 2026 06:00:33 +0000
Received: by outflank-mailman (input) for mailman id 1406388;
 Thu, 03 Sep 2026 06:00:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x20Uy-0000MC-KM
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 06:00:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20Uy-003QYH-2j
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x20Uy-000Z6q-1n
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 06:00:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=lKnhfv9EPDV/MXlIpAKWwGKNbFKH0zOvzFmXXB8pfSU=; b=lt1hM4oBdYQGI3YnczQUvCKwWH
	LjyM3vG7VdIZSLpjpWdCRw8DacfwznLm22aSESSF+doFUj0uVN2EVyedlFx1jY4JqZvZ6UDlEcIjj
	POUXQlKTTiu46BVB6JDklPEOngTJoWfqUb73aK0lS6CmImvAwSbIu0YECYf0ZsUR5D0o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/bitops: don't cast away volatile-ness
Message-Id: <E1x20Uy-000Z6q-1n@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 06:00:32 +0000

commit d5d126a225e78071fbb5db126744bc2a36d511df
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 2 08:30:49 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 2 21:44:30 2026 +0100

    x86/bitops: don't cast away volatile-ness
    
    Doing so, besides being a bad idea in general, violates Misra rule 11.8.
    
    No functional change intended.
    
    Fixes: f1879b2c2584 ("xen: introduce generic non-atomic test_*bit()")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
---
 xen/arch/x86/include/asm/bitops.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index b806002a96..557cee03ba 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -191,7 +191,9 @@ static inline int arch__test_and_set_bit(int nr, volatile void *addr)
     asm volatile ( "btsl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -239,7 +241,9 @@ static inline int arch__test_and_clear_bit(int nr, volatile void *addr)
     asm volatile ( "btrl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
@@ -253,7 +257,9 @@ static inline int arch__test_and_change_bit(int nr, volatile void *addr)
     asm volatile ( "btcl %[nr], %[addr]\n\t"
                    ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
                    : [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit),
-                     [addr] "+m" (*(int *)addr) : [nr] "Ir" (nr) : "memory" );
+                     [addr] "+m" (*(volatile int *)addr)
+                   : [nr] "Ir" (nr)
+                   : "memory" );
 
     return oldbit;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 08:55:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 08:55:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406579.1639801 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x23Dr-0005ME-6W; Thu, 03 Sep 2026 08:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406579.1639801; Thu, 03 Sep 2026 08:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x23Dr-0005M5-3v; Thu, 03 Sep 2026 08:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1406579;
 Thu, 03 Sep 2026 08:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x23Dp-0005Lz-Uu
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 08:55:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x23Dq-003UN8-0E
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 08:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x23Dp-008jfE-2S
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 08:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=n8tyqmwkZ/gFZq5wsgrpcmvZdlO9vcnvCvbFR+wY7ss=; b=rvZJU2Zb8RDxyaR23V5drsn4sg
	gDKBnkCzSsi3BIQYQhGICbh3C8hDMjyWqGLh12fxbfResnhTNzlAcsOyCM8tMcunHBa02MjLS1Px2
	czzNlEsXQ4Yy0Vqj06fEWNInVUO636ei8GYWctVhQJOKHP2E0YUJ/+bokjmQBmJVhG14=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x23Dp-008jfE-2S@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 08:55:01 +0000

commit b4a671acf151dec87bc99bc2547e73149bd3c55e
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 23:28:46 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 3 09:45:16 2026 +0100

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index 1aefeab663..4c27987551 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -76,8 +76,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, true);
 
     if ( rc < 0 )
@@ -93,7 +94,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 09:55:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 09:55:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406652.1639832 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x249w-0006fc-1Q; Thu, 03 Sep 2026 09:55:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406652.1639832; Thu, 03 Sep 2026 09:55:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x249v-0006fU-V0; Thu, 03 Sep 2026 09:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1406652;
 Thu, 03 Sep 2026 09:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x249u-0006fO-Ou
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 09:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x249u-003VUc-29
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x249u-000vUQ-15
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=HbycW8yE3qaf3cxuDi2qHVkvf8LUCuC3eTafRLFsQv8=; b=C/GPXLASLGHfSYIFchLlxCMHFP
	m3dn7gRxdLROcM3Pgd5L3kaIv523jAJQY7eFxuOGR32l4ReTPnO8F5M00TojWCFL5BLbi87dsrEVO
	sdDwh+FgfSENbIfk1mK7teod5zLiBQCfu+eG06fJRPoIBsuZ7WBzP8qrCB5mTuG7AUVk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm/alternative: hide casting away of const
Message-Id: <E1x249u-000vUQ-15@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 09:55:02 +0000

commit a36bde9a3ac3a9754c6a9b1f2a770d9215b5e31a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:56:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 10:59:51 2026 +0200

    Arm/alternative: hide casting away of const
    
    We want to patch the original call site, which memory-wise is unrelated
    to the struct alt_instr * that we start from.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/alternative.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
index adb9b7d881..44b5e09732 100644
--- a/xen/arch/arm/alternative.c
+++ b/xen/arch/arm/alternative.c
@@ -134,7 +134,7 @@ static int __apply_alternatives(const struct alt_region *region,
             BUG_ON(alt->repl_len != alt->orig_len);
 
         origptr = ALT_ORIG_PTR(alt);
-        updptr = (void *)origptr + update_offset;
+        updptr = (void *)(unsigned long)origptr + update_offset;
 
         nr_inst = alt->orig_len / ARCH_PATCH_INSN_SIZE;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 09:55:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 09:55:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406653.1639836 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24A6-0006hB-2v; Thu, 03 Sep 2026 09:55:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406653.1639836; Thu, 03 Sep 2026 09:55:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24A6-0006h3-0B; Thu, 03 Sep 2026 09:55:14 +0000
Received: by outflank-mailman (input) for mailman id 1406653;
 Thu, 03 Sep 2026 09:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24A4-0006gr-HR
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 09:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24A4-003VUg-2T
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24A4-000wlH-1W
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MF5bZ0TBEh+av6HGjd5XxLyBDfY3h+TkBg8crx00gNg=; b=45DJ/GvWG10q76vze3Nh7714Ul
	2/5Z6gKYt2fJxWoGZIKZaeqx/r5YoJlafgz0NOS+AFeYzdFWVQLEXO0Zr6yq3DS3OzqgZqJ1ObAee
	dbQTDxs//GhpDqXh6N7AqmIORTFNOPtOBS+BoiwGNq+YHfce0tn8uDl9KJ9YQfL/qJpY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm64/GICv3: have gicv3_its_find_quirk() not cast away const-ness
Message-Id: <E1x24A4-000wlH-1W@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 09:55:12 +0000

commit 2c3aaf0fe7d630ddb707c1f034200a42e8b573f8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:57:52 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 10:59:51 2026 +0200

    Arm64/GICv3: have gicv3_its_find_quirk() not cast away const-ness
    
    Doing so violates Misra rule 11.8, while being entirely unnecessary here:
    All callers already store the return value in pointer-to-const variables.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/gic-v3-its.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
index 7560d46c6d..325835b0ad 100644
--- a/xen/arch/arm/gic-v3-its.c
+++ b/xen/arch/arm/gic-v3-its.c
@@ -84,14 +84,14 @@ static const struct its_quirk its_quirks[] = {
     }
 };
 
-static struct its_quirk* gicv3_its_find_quirk(uint32_t iidr)
+static const struct its_quirk *gicv3_its_find_quirk(uint32_t iidr)
 {
     const struct its_quirk *quirks = its_quirks;
 
     for ( ; quirks->desc; quirks++ )
     {
         if ( quirks->iidr == (quirks->mask & iidr) )
-            return (struct its_quirk *)quirks;
+            return quirks;
     }
 
     return NULL;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 09:55:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 09:55:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406654.1639840 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24AG-0006jG-49; Thu, 03 Sep 2026 09:55:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406654.1639840; Thu, 03 Sep 2026 09:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24AG-0006j8-1W; Thu, 03 Sep 2026 09:55:24 +0000
Received: by outflank-mailman (input) for mailman id 1406654;
 Thu, 03 Sep 2026 09:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24AE-0006j0-L0
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 09:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24AE-003VV8-2m
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24AE-000yFW-1p
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=I9Nfj9doBza2ur7cfaahnmeO41JoBPwcllEGdOtx33s=; b=mhyueUvQJW/n9SuIUS9nObO584
	qaVXUmk0S1QA2xklROs35OCogs8mnWEN0zvQ93fqJ0WSuDgHHMb8+fpsawRvSEXG3E46LN+hufZeG
	Ow7OHx3kfOTcBUogpGcL7hKIPMRmW0LGKFXhkEjeEGPXH7eADy7PSyUBsgVXdtszC4BY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xhci-dbc: don't cast away const-ness in xhci_find_dbc()
Message-Id: <E1x24AE-000yFW-1p@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 09:55:22 +0000

commit 769263b1241fcfcd85096ae021424a7a5f24ea63
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:58:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 10:59:58 2026 +0200

    xhci-dbc: don't cast away const-ness in xhci_find_dbc()
    
    Doing so (at the return statement), besides being a bad idea anyway, is a
    violation of Misra rule 11.8.
    
    Make "xcap" have an initializer while adjusting the code anyway.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/drivers/char/xhci-dbc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/char/xhci-dbc.c b/xen/drivers/char/xhci-dbc.c
index c1ff528de6..5651cb179b 100644
--- a/xen/drivers/char/xhci-dbc.c
+++ b/xen/drivers/char/xhci-dbc.c
@@ -384,16 +384,15 @@ static bool __init dbc_init_xhc(struct dbc *dbc)
  */
 static struct dbc_reg __iomem *xhci_find_dbc(struct dbc *dbc)
 {
-    const uint32_t __iomem *xcap;
     uint32_t xcap_val;
     uint32_t next;
     uint32_t id = 0;
-    const void __iomem *mmio = dbc->xhc_mmio;
+    void __iomem *mmio = dbc->xhc_mmio;
     const uint32_t __iomem *hccp1 = mmio + 0x10;
+    uint32_t __iomem *xcap = mmio;
     const uint32_t DBC_ID = 0xA;
     int ttl = 48;
 
-    xcap = mmio;
     /*
      * This is initially an offset to the first capability. All the offsets
      * (both in HCCP1 and then next capability pointer) are dword-based.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 09:55:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 09:55:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406655.1639844 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24AQ-0006ln-75; Thu, 03 Sep 2026 09:55:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406655.1639844; Thu, 03 Sep 2026 09:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24AQ-0006ld-4C; Thu, 03 Sep 2026 09:55:34 +0000
Received: by outflank-mailman (input) for mailman id 1406655;
 Thu, 03 Sep 2026 09:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24AO-0006lX-Nq
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 09:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24AO-003VVE-36
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24AO-000zjz-29
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 09:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=znyY8EdkY0Y9wwQggsIMy2C0+/XvGgNfgE49f32/1EY=; b=m2V7pgotsIua2QcSroH97tIB55
	BJjiEIko82QDHztJ3W9JMOC595WpX3mROI0tH5MgspIAroOMKePNaR2p1EGY9qWhGYdUjnovvX7RG
	t7k6uF8znKw2B77HS50cyQ1VjkCNPGgNcJeAg6oAiuvKnizZEg0zo4IIcJWF9K2rRGFA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/alternatives: mark .altinstructions r/w
Message-Id: <E1x24AO-000zjz-29@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 09:55:32 +0000

commit 48728c33e43329c8037575320ce681a65cc13eb7
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:58:51 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 11:00:05 2026 +0200

    x86/alternatives: mark .altinstructions r/w
    
    Forever since the introduction of the .priv member it has been wrong to
    record the section as r/o.
    
    .alt_call_sites, otoh, is legitimately r/o, hence
    __alt_call_sites_{start,end}[] would better reflect that.
    
    Fixes: 4008c71d7af2 ("x86/alt: Support for automatic padding calculations")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/alternative.c                 | 2 +-
 xen/arch/x86/include/asm/alternative-asm.h | 4 ++--
 xen/arch/x86/include/asm/alternative.h     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
index 5709c0b514..80c4dc721b 100644
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -464,7 +464,7 @@ static unsigned int __initdata alt_todo;
 static unsigned int __initdata alt_done;
 
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
-extern struct alt_call __alt_call_sites_start[], __alt_call_sites_end[];
+extern const struct alt_call __alt_call_sites_start[], __alt_call_sites_end[];
 
 /*
  * At boot time, we patch alternatives in NMI context.  This means that the
diff --git a/xen/arch/x86/include/asm/alternative-asm.h b/xen/arch/x86/include/asm/alternative-asm.h
index d5c7f18160..8fd18204f1 100644
--- a/xen/arch/x86/include/asm/alternative-asm.h
+++ b/xen/arch/x86/include/asm/alternative-asm.h
@@ -59,7 +59,7 @@
 .macro ALTERNATIVE oldinstr, newinstr, feature
     decl_orig(\oldinstr, repl_len(1) - orig_len)
 
-    .pushsection .altinstructions, "a", @progbits
+    .pushsection .altinstructions, "aw", @progbits
     altinstruction_entry .L\@_orig_s, .L\@_repl_s1, \feature, \
         orig_len, repl_len(1), pad_len
 
@@ -82,7 +82,7 @@
 .macro ALTERNATIVE_2 oldinstr, newinstr1, feature1, newinstr2, feature2
     decl_orig(\oldinstr, as_max(repl_len(1), repl_len(2)) - orig_len)
 
-    .pushsection .altinstructions, "a", @progbits
+    .pushsection .altinstructions, "aw", @progbits
 
     altinstruction_entry .L\@_orig_s, .L\@_repl_s1, \feature1, \
         orig_len, repl_len(1), pad_len
diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h
index 18109e3dc5..5ac36342aa 100644
--- a/xen/arch/x86/include/asm/alternative.h
+++ b/xen/arch/x86/include/asm/alternative.h
@@ -90,7 +90,7 @@ extern void alternative_instructions(void);
 /* alternative assembly primitive: */
 #define ALTERNATIVE(oldinstr, newinstr, feature)                        \
         OLDINSTR_1(oldinstr, 1)                                         \
-        ".pushsection .altinstructions, \"a\", @progbits\n"             \
+        ".pushsection .altinstructions, \"aw\", @progbits\n"            \
         ALTINSTR_ENTRY(feature, 1)                                      \
         ".section .discard, \"a\", @progbits\n"                         \
         ".byte " alt_total_len "\n" /* total_len <= 255 */              \
@@ -101,7 +101,7 @@ extern void alternative_instructions(void);
 
 #define ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \
         OLDINSTR_2(oldinstr, 1, 2)                                      \
-        ".pushsection .altinstructions, \"a\", @progbits\n"             \
+        ".pushsection .altinstructions, \"aw\", @progbits\n"            \
         ALTINSTR_ENTRY(feature1, 1)                                     \
         ALTINSTR_ENTRY(feature2, 2)                                     \
         ".section .discard, \"a\", @progbits\n"                         \
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 10:44:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 10:44:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406789.1639956 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24vL-00031f-Pp; Thu, 03 Sep 2026 10:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406789.1639956; Thu, 03 Sep 2026 10:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24vL-00031Y-N9; Thu, 03 Sep 2026 10:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1406789;
 Thu, 03 Sep 2026 10:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24vK-00031S-Ez
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 10:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vK-003WUg-0f
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vJ-007uEU-2v
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Laz1476f0HD/X0J6ycLYE1pVpFnx+ZBbJusbSC82ZDE=; b=CNL6zXAaMne3693WPNNFQoa8B6
	dG0V6iXC0djAGGdpPyBGTSDkO1oxeFRbcuGRdzwWRQUQf2Wir6DidEEFQG/k3sM+Qvqt6gZf6z5vW
	ruIP7zzBiHcrD1orBKnMfRMEiyLRtKkRlGvg2YPqR8IkSX/k7EA3Fqi2mj6whDn+87LA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x24vJ-007uEU-2v@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 10:44:01 +0000

commit b4a671acf151dec87bc99bc2547e73149bd3c55e
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 2 23:28:46 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 3 09:45:16 2026 +0100

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index 1aefeab663..4c27987551 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -76,8 +76,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, true);
 
     if ( rc < 0 )
@@ -93,7 +94,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 10:44:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 10:44:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406790.1639960 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24vU-00033N-RQ; Thu, 03 Sep 2026 10:44:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406790.1639960; Thu, 03 Sep 2026 10:44:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24vU-00033G-Oh; Thu, 03 Sep 2026 10:44:12 +0000
Received: by outflank-mailman (input) for mailman id 1406790;
 Thu, 03 Sep 2026 10:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24vU-000334-3C
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 10:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vU-003WUp-13
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vU-007vlz-04
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=NR2QpiduN5T10UaK/dxVyklmZXpRNKNkniiv2+bRRlA=; b=k1Ale31Fhy3gHF2iQlsbvwm6nt
	+jDPIL5aqTfbzTJsOzRlJmw8iPBNy7/apUj2lk2Y4nbBjABd2wKz9IDsODFcq2ZAvPgZA6MNP4m1h
	c3L9OhSkD64YkUWKARJ656p59ytZWvyWjAgtHhkx6CGJyn9dj6PCHl6LDxcklPpBRr2A=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm/alternative: hide casting away of const
Message-Id: <E1x24vU-007vlz-04@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 10:44:12 +0000

commit a36bde9a3ac3a9754c6a9b1f2a770d9215b5e31a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:56:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 10:59:51 2026 +0200

    Arm/alternative: hide casting away of const
    
    We want to patch the original call site, which memory-wise is unrelated
    to the struct alt_instr * that we start from.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/alternative.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
index adb9b7d881..44b5e09732 100644
--- a/xen/arch/arm/alternative.c
+++ b/xen/arch/arm/alternative.c
@@ -134,7 +134,7 @@ static int __apply_alternatives(const struct alt_region *region,
             BUG_ON(alt->repl_len != alt->orig_len);
 
         origptr = ALT_ORIG_PTR(alt);
-        updptr = (void *)origptr + update_offset;
+        updptr = (void *)(unsigned long)origptr + update_offset;
 
         nr_inst = alt->orig_len / ARCH_PATCH_INSN_SIZE;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 10:44:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 10:44:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406791.1639964 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24ve-00035M-Sr; Thu, 03 Sep 2026 10:44:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406791.1639964; Thu, 03 Sep 2026 10:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24ve-00035E-QF; Thu, 03 Sep 2026 10:44:22 +0000
Received: by outflank-mailman (input) for mailman id 1406791;
 Thu, 03 Sep 2026 10:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24ve-000356-6u
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 10:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24ve-003WUu-1O
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24ve-007xi6-0T
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=V2GpkdWTk3VHvYLbIc5uwb1S8VBpTTyBxqS4jH9i4NI=; b=q4OYBz7j1zy2+1T49qtJu+TgNI
	5rCJQPoogKkr7xGihOj0ddZ168TYI9NfRc/GexKdZdRIkwHu8YrC5ZrAoodJ44Sy5ocDAuxm0ODLS
	FDbBdgEXcFHApC+TjCpd8Jf4LSYUi+8/l0hHPfeqy0xWN3fRxygpeSiBQ1A6X65HvW84=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm64/GICv3: have gicv3_its_find_quirk() not cast away const-ness
Message-Id: <E1x24ve-007xi6-0T@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 10:44:22 +0000

commit 2c3aaf0fe7d630ddb707c1f034200a42e8b573f8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:57:52 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 10:59:51 2026 +0200

    Arm64/GICv3: have gicv3_its_find_quirk() not cast away const-ness
    
    Doing so violates Misra rule 11.8, while being entirely unnecessary here:
    All callers already store the return value in pointer-to-const variables.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/gic-v3-its.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
index 7560d46c6d..325835b0ad 100644
--- a/xen/arch/arm/gic-v3-its.c
+++ b/xen/arch/arm/gic-v3-its.c
@@ -84,14 +84,14 @@ static const struct its_quirk its_quirks[] = {
     }
 };
 
-static struct its_quirk* gicv3_its_find_quirk(uint32_t iidr)
+static const struct its_quirk *gicv3_its_find_quirk(uint32_t iidr)
 {
     const struct its_quirk *quirks = its_quirks;
 
     for ( ; quirks->desc; quirks++ )
     {
         if ( quirks->iidr == (quirks->mask & iidr) )
-            return (struct its_quirk *)quirks;
+            return quirks;
     }
 
     return NULL;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 10:44:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 10:44:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406793.1639977 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24vq-0003MS-4O; Thu, 03 Sep 2026 10:44:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406793.1639977; Thu, 03 Sep 2026 10:44:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24vq-0003MK-1k; Thu, 03 Sep 2026 10:44:34 +0000
Received: by outflank-mailman (input) for mailman id 1406793;
 Thu, 03 Sep 2026 10:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24vo-0003Ll-AH
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 10:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vo-003WVN-1l
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vo-007zb4-0n
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0ZTm5U9yU2GAewNhO67Qc44xqXb98+Pzh119tQ2mlX0=; b=SurmBRh8v4oEmbNUNMuLeGrgbO
	f6OwBOwRDNk3nLhbmspR1meNHNioc281PYEe5y1aWNndgc3u7t9l0iDM6uJpUnZWnYVCOQQ7TKyp3
	pSVUWYUwDB9LDiIBhXYIeEaJQTFpFauk0Xn3h/XrapbW5I5+YJj9vaDr6HE7zhEY7oV8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xhci-dbc: don't cast away const-ness in xhci_find_dbc()
Message-Id: <E1x24vo-007zb4-0n@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 10:44:32 +0000

commit 769263b1241fcfcd85096ae021424a7a5f24ea63
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:58:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 10:59:58 2026 +0200

    xhci-dbc: don't cast away const-ness in xhci_find_dbc()
    
    Doing so (at the return statement), besides being a bad idea anyway, is a
    violation of Misra rule 11.8.
    
    Make "xcap" have an initializer while adjusting the code anyway.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/drivers/char/xhci-dbc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/char/xhci-dbc.c b/xen/drivers/char/xhci-dbc.c
index c1ff528de6..5651cb179b 100644
--- a/xen/drivers/char/xhci-dbc.c
+++ b/xen/drivers/char/xhci-dbc.c
@@ -384,16 +384,15 @@ static bool __init dbc_init_xhc(struct dbc *dbc)
  */
 static struct dbc_reg __iomem *xhci_find_dbc(struct dbc *dbc)
 {
-    const uint32_t __iomem *xcap;
     uint32_t xcap_val;
     uint32_t next;
     uint32_t id = 0;
-    const void __iomem *mmio = dbc->xhc_mmio;
+    void __iomem *mmio = dbc->xhc_mmio;
     const uint32_t __iomem *hccp1 = mmio + 0x10;
+    uint32_t __iomem *xcap = mmio;
     const uint32_t DBC_ID = 0xA;
     int ttl = 48;
 
-    xcap = mmio;
     /*
      * This is initially an offset to the first capability. All the offsets
      * (both in HCCP1 and then next capability pointer) are dword-based.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 03 10:44:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Sep 2026 10:44:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1406796.1639982 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24w0-0003Sk-6J; Thu, 03 Sep 2026 10:44:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1406796.1639982; Thu, 03 Sep 2026 10:44:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x24w0-0003Sd-31; Thu, 03 Sep 2026 10:44:44 +0000
Received: by outflank-mailman (input) for mailman id 1406796;
 Thu, 03 Sep 2026 10:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x24vy-0003Rx-Ed
 for xen-changelog@lists.xenproject.org; Thu, 03 Sep 2026 10:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vy-003WVR-2B
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x24vy-0081Ny-1B
 for xen-changelog@lists.xenproject.org;
 Thu, 03 Sep 2026 10:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=FBVGL/s0T2uDK98JKBodWxKikzN5Y2UFxnAfpPIf/eM=; b=gMdgxv1wIxfCf2Geb936CzWZ7v
	AS/Id9LF4S3PxQzMkn2407b/WRnL9S37tpscjX4KbEvqLJMscOYh4rj7TY99+Crb/Xg6vdITTDjdn
	/9VxFzcb7aKKiTAUqg+LNaATy/IG01iso0RlX14lNnXonvygt1k3SsxZS/gqbQfTwzEA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/alternatives: mark .altinstructions r/w
Message-Id: <E1x24vy-0081Ny-1B@xenbits.xenproject.org>
Date: Thu, 03 Sep 2026 10:44:42 +0000

commit 48728c33e43329c8037575320ce681a65cc13eb7
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 3 09:58:51 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 3 11:00:05 2026 +0200

    x86/alternatives: mark .altinstructions r/w
    
    Forever since the introduction of the .priv member it has been wrong to
    record the section as r/o.
    
    .alt_call_sites, otoh, is legitimately r/o, hence
    __alt_call_sites_{start,end}[] would better reflect that.
    
    Fixes: 4008c71d7af2 ("x86/alt: Support for automatic padding calculations")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/alternative.c                 | 2 +-
 xen/arch/x86/include/asm/alternative-asm.h | 4 ++--
 xen/arch/x86/include/asm/alternative.h     | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
index 5709c0b514..80c4dc721b 100644
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -464,7 +464,7 @@ static unsigned int __initdata alt_todo;
 static unsigned int __initdata alt_done;
 
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
-extern struct alt_call __alt_call_sites_start[], __alt_call_sites_end[];
+extern const struct alt_call __alt_call_sites_start[], __alt_call_sites_end[];
 
 /*
  * At boot time, we patch alternatives in NMI context.  This means that the
diff --git a/xen/arch/x86/include/asm/alternative-asm.h b/xen/arch/x86/include/asm/alternative-asm.h
index d5c7f18160..8fd18204f1 100644
--- a/xen/arch/x86/include/asm/alternative-asm.h
+++ b/xen/arch/x86/include/asm/alternative-asm.h
@@ -59,7 +59,7 @@
 .macro ALTERNATIVE oldinstr, newinstr, feature
     decl_orig(\oldinstr, repl_len(1) - orig_len)
 
-    .pushsection .altinstructions, "a", @progbits
+    .pushsection .altinstructions, "aw", @progbits
     altinstruction_entry .L\@_orig_s, .L\@_repl_s1, \feature, \
         orig_len, repl_len(1), pad_len
 
@@ -82,7 +82,7 @@
 .macro ALTERNATIVE_2 oldinstr, newinstr1, feature1, newinstr2, feature2
     decl_orig(\oldinstr, as_max(repl_len(1), repl_len(2)) - orig_len)
 
-    .pushsection .altinstructions, "a", @progbits
+    .pushsection .altinstructions, "aw", @progbits
 
     altinstruction_entry .L\@_orig_s, .L\@_repl_s1, \feature1, \
         orig_len, repl_len(1), pad_len
diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h
index 18109e3dc5..5ac36342aa 100644
--- a/xen/arch/x86/include/asm/alternative.h
+++ b/xen/arch/x86/include/asm/alternative.h
@@ -90,7 +90,7 @@ extern void alternative_instructions(void);
 /* alternative assembly primitive: */
 #define ALTERNATIVE(oldinstr, newinstr, feature)                        \
         OLDINSTR_1(oldinstr, 1)                                         \
-        ".pushsection .altinstructions, \"a\", @progbits\n"             \
+        ".pushsection .altinstructions, \"aw\", @progbits\n"            \
         ALTINSTR_ENTRY(feature, 1)                                      \
         ".section .discard, \"a\", @progbits\n"                         \
         ".byte " alt_total_len "\n" /* total_len <= 255 */              \
@@ -101,7 +101,7 @@ extern void alternative_instructions(void);
 
 #define ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2) \
         OLDINSTR_2(oldinstr, 1, 2)                                      \
-        ".pushsection .altinstructions, \"a\", @progbits\n"             \
+        ".pushsection .altinstructions, \"aw\", @progbits\n"            \
         ALTINSTR_ENTRY(feature1, 1)                                     \
         ALTINSTR_ENTRY(feature2, 2)                                     \
         ".section .discard, \"a\", @progbits\n"                         \
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 04 19:00:08 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Sep 2026 19:00:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1409051.1641254 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x2Z8t-0004wh-Ac; Fri, 04 Sep 2026 19:00:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1409051.1641254; Fri, 04 Sep 2026 19:00:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x2Z8t-0004wK-7h; Fri, 04 Sep 2026 19:00:03 +0000
Received: by outflank-mailman (input) for mailman id 1409051;
 Fri, 04 Sep 2026 19:00:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x2Z8s-0004eu-A6
 for xen-changelog@lists.xenproject.org; Fri, 04 Sep 2026 19:00:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x2Z8s-005N4D-0m
 for xen-changelog@lists.xenproject.org;
 Fri, 04 Sep 2026 19:00:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x2Z8r-00BxN2-2y
 for xen-changelog@lists.xenproject.org;
 Fri, 04 Sep 2026 19:00:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=mPQtHdKayq5ig2kHLtdBl/+5trwF12/KkpMGjdBuXMM=; b=zUauCLi72tQLuxKE0q0hPOmZ4I
	vse+Cuxv1s1xnjTSIrxD+vCvlaoJirApCwb8gtOs+bkPbyL2D/t3He7/75dPQRBX292/Gnx0fWUk4
	dpBdw0rq19rEQOhevOwGF/TWhu51pbRsrXpvHEuwfHYqltlN7I3JdyeB5g0gE2wknSH4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] nestedsvm: Crash domain rather than Xen on unexpected VMEXIT
Message-Id: <E1x2Z8r-00BxN2-2y@xenbits.xenproject.org>
Date: Fri, 04 Sep 2026 19:00:01 +0000

commit d1a5335baaa1a81ed837f8f0bdc79215381c9019
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Fri Sep 4 15:27:57 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 4 19:54:13 2026 +0100

    nestedsvm: Crash domain rather than Xen on unexpected VMEXIT
    
    On encountering an unexpected VMEXIT (e.g. because L1 has used an
    intercept that L0 Xen doesn't know about), crash the domain rather than
    the hypervisor.
    
    Fixes: 9a779e4fc161 ("Implement SVM specific part for Nested Virtualization")
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 3d0e77f5eb..5adb1bd72c 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -923,7 +923,7 @@ nsvm_vmcb_guest_intercepts_exitcode(struct vcpu *v,
 
     default:
         gdprintk(XENLOG_ERR, "Illegal exitcode %#"PRIx64"\n", exitcode);
-        BUG();
+        domain_crash(v->domain);
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 04 20:22:09 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Sep 2026 20:22:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1409121.1641294 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x2aQF-0002Ky-Qa; Fri, 04 Sep 2026 20:22:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1409121.1641294; Fri, 04 Sep 2026 20:22:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x2aQF-0002Kq-Nm; Fri, 04 Sep 2026 20:22:03 +0000
Received: by outflank-mailman (input) for mailman id 1409121;
 Fri, 04 Sep 2026 20:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x2aQE-0002Kk-Gt
 for xen-changelog@lists.xenproject.org; Fri, 04 Sep 2026 20:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x2aQE-005PEU-1H
 for xen-changelog@lists.xenproject.org;
 Fri, 04 Sep 2026 20:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x2aQE-00EhrK-0F
 for xen-changelog@lists.xenproject.org;
 Fri, 04 Sep 2026 20:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=oI1gPHCDsksNCPyqbgf0E6wO+O3TzUUfMH84jwb8XTo=; b=Zrpb/fYR1JpNS2vtw8Kxnz/MGk
	JS5YcgF9hlSbwEoPVhpi74Tm2SrEcT48UEQg3O0vM3hXUfde2AxVZfofljRWPHS1sP1gaxXQeX+2a
	Rgl11LeWJ3Cnw/ZVafYEhF8trVGBgnCCve7NIoXbRc00MtPhrXbtzrJEXNMPPr4okSy4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] nestedsvm: Crash domain rather than Xen on unexpected VMEXIT
Message-Id: <E1x2aQE-00EhrK-0F@xenbits.xenproject.org>
Date: Fri, 04 Sep 2026 20:22:02 +0000

commit d1a5335baaa1a81ed837f8f0bdc79215381c9019
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Fri Sep 4 15:27:57 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 4 19:54:13 2026 +0100

    nestedsvm: Crash domain rather than Xen on unexpected VMEXIT
    
    On encountering an unexpected VMEXIT (e.g. because L1 has used an
    intercept that L0 Xen doesn't know about), crash the domain rather than
    the hypervisor.
    
    Fixes: 9a779e4fc161 ("Implement SVM specific part for Nested Virtualization")
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 3d0e77f5eb..5adb1bd72c 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -923,7 +923,7 @@ nsvm_vmcb_guest_intercepts_exitcode(struct vcpu *v,
 
     default:
         gdprintk(XENLOG_ERR, "Illegal exitcode %#"PRIx64"\n", exitcode);
-        BUG();
+        domain_crash(v->domain);
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 09:44:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 09:44:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410745.1641532 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3VtT-0007HM-NT; Mon, 07 Sep 2026 09:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410745.1641532; Mon, 07 Sep 2026 09:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3VtT-0007HD-Ks; Mon, 07 Sep 2026 09:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1410745;
 Mon, 07 Sep 2026 09:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3VtS-0007H7-KO
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 09:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3VtR-0038m8-2z
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3VtS-0082Wf-0e
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0OfFHr65NNLi+fXppWuQgkdqltPabtkH4IlHsypjK1k=; b=dZil3uAgUrMOcZn2P3dIbhMTGF
	gJZTrHPovz9L4TlwD7+zhmYhfWQh6R5vK0hmGdbfsZ5CObHemd1TQMi4kU0hlzZMQ4bLxe97YNxVX
	AKVs95K+9mSKDz45Vsrm6PiW3JUUuFsKRPpOD8AX2EWwLvoMJZkqZh1N6AqDHimzVUnM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/boot: don't cast away const-ness
Message-Id: <E1x3VtS-0082Wf-0e@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 09:44:02 +0000

commit 1e204d768b50f2be244a1deccd9de87ae006cbac
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 10:40:50 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:40:50 2026 +0200

    x86/boot: don't cast away const-ness
    
    While the general C library strchr() has to do so, the early boot cmdline
    parsing has no such requirement.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/boot/cmdline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/boot/cmdline.c b/xen/arch/x86/boot/cmdline.c
index 196c580e91..cf9e32b6d9 100644
--- a/xen/arch/x86/boot/cmdline.c
+++ b/xen/arch/x86/boot/cmdline.c
@@ -77,12 +77,12 @@ static int strncmp(const char *cs, const char *ct, size_t count)
     return 0;
 }
 
-static char *strchr(const char *s, int c)
+static const char *strchr(const char *s, int c)
 {
     for ( ; *s != (char)c; ++s )
         if ( *s == '\0' )
             return NULL;
-    return (char *)s;
+    return s;
 }
 
 static size_t strspn(const char *s, const char *accept)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 09:44:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 09:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410746.1641536 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Vtd-0007KD-Oj; Mon, 07 Sep 2026 09:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410746.1641536; Mon, 07 Sep 2026 09:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Vtd-0007K5-MA; Mon, 07 Sep 2026 09:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1410746;
 Mon, 07 Sep 2026 09:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Vtc-0007Jv-C3
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 09:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Vtc-0038mC-04
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Vtc-0083UI-0y
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=y8MrwFe8rUVGGQXhA839MuINHSNA6Cg40oJ/VOV7CZU=; b=qRBIYIUehXi25btmTeHFn8l6QC
	S9vWIpdhe+7tl2oltWcSR6nXIzCdujW7Evaq+FbBzqIV/dVJ/vCPt8k21LXqEsWQrwd4ByznLPN/Q
	OnkX3EJGBprJz1YA3GxaqSr2HWAxqmiscOjusWuA/BP1xwk2dxgeuejEg2h+rwWBoGZc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/altcall: hide casting away of const
Message-Id: <E1x3Vtc-0083UI-0y@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 09:44:12 +0000

commit 74b000804485db0d1b02b4f714b975643379c405
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 10:41:04 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:41:04 2026 +0200

    x86/altcall: hide casting away of const
    
    ALT_CALL_PTR() really means to get rid of const (when necessary, i.e. when
    used from apply_alt_calls()): We want to patch the original call site,
    after all, and memory-wise that's unrelated to the struct alt_call * that
    we start from.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/include/asm/alternative-call.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/alternative-call.h b/xen/arch/x86/include/asm/alternative-call.h
index 27024797f5..809023bc4d 100644
--- a/xen/arch/x86/include/asm/alternative-call.h
+++ b/xen/arch/x86/include/asm/alternative-call.h
@@ -9,7 +9,7 @@
 struct alt_call {
     int32_t offset;
 };
-#define ALT_CALL_PTR(a) ((void *)&(a)->offset + (a)->offset)
+#define ALT_CALL_PTR(a) ((void *)((long)&(a)->offset + (a)->offset))
 #define ALT_CALL_LEN(a) (6)
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 09:44:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 09:44:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410747.1641540 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Vtn-0007NH-QU; Mon, 07 Sep 2026 09:44:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410747.1641540; Mon, 07 Sep 2026 09:44:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Vtn-0007N9-NX; Mon, 07 Sep 2026 09:44:23 +0000
Received: by outflank-mailman (input) for mailman id 1410747;
 Mon, 07 Sep 2026 09:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Vtm-0007My-FS
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 09:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Vtm-0038mJ-0O
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Vtm-0084Sj-1K
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=HnVUNnVr1bHnGYtLMdhzPbkuiJ16RlARTJ9TVofyhZg=; b=IVGi51+IJQ1EeqUTP4l+9bTwt9
	2btDBDXJQdfK1QCkdaauDWKJWqy6oGUm/1/wzZ7smuncxW8RtxV/Fbnt4WNZZXupOOD7P5Lo4ENiE
	y+T9J39jUzDnVY1PspDAxLROoWV4wDwsfQFCuVui+uEhZhs9NvFL3IwZCgKcTKUyMek4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86emul: adjust file comments
Message-Id: <E1x3Vtm-0084Sj-1K@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 09:44:22 +0000

commit 582b94e41b22b633f6212387425844f0e32b2ae4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 10:41:27 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:41:27 2026 +0200

    x86emul: adjust file comments
    
    With the split-off of decoding into a separate file, both files' top
    comments should have been adjusted accordingly.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/decode.c      | 2 +-
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/decode.c b/xen/arch/x86/x86_emulate/decode.c
index 947f49d870..c4b18718f8 100644
--- a/xen/arch/x86/x86_emulate/decode.c
+++ b/xen/arch/x86/x86_emulate/decode.c
@@ -2,7 +2,7 @@
 /******************************************************************************
  * decode.c - helper for x86_emulate.c
  *
- * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
+ * Generic x86 (32-bit and 64-bit) instruction decoder.
  *
  * Copyright (c) 2005-2007 Keir Fraser
  * Copyright (c) 2005-2007 XenSource Inc.
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 7de6460836..830ad90c9c 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -2,7 +2,7 @@
 /******************************************************************************
  * x86_emulate.c
  *
- * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
+ * Generic x86 (32-bit and 64-bit) instruction emulator.
  *
  * Copyright (c) 2005-2007 Keir Fraser
  * Copyright (c) 2005-2007 XenSource Inc.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 09:44:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 09:44:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410748.1641544 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Vtx-0007PL-Rd; Mon, 07 Sep 2026 09:44:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410748.1641544; Mon, 07 Sep 2026 09:44:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Vtx-0007PD-Ox; Mon, 07 Sep 2026 09:44:33 +0000
Received: by outflank-mailman (input) for mailman id 1410748;
 Mon, 07 Sep 2026 09:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Vtw-0007P5-JA
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 09:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Vtw-0038mU-0l
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Vtw-0085NI-1d
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 09:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=9UQNmQ0kBIqjSu4sSFvnz29Q2idfwuHWRtuwU8fnH/M=; b=ofMSpz0WKnTmSyj6NEYT7b1mSi
	PYxGYpbGe3bpHuy76hgpQ//hepBnWdsX9xgto+lmGTjw74V69RBhuFVKG+SfTTO9orJHv35gkBvUA
	L/NRALgb0owNgnacNgStonDd/+pIAwX9zoDmNDcMs0anPbPtcKSZeDzPsJ4GRm/F1sk4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: fix out-of-range indexing of the IMSIC per-CPU MSI array
Message-Id: <E1x3Vtw-0085NI-1d@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 09:44:32 +0000

commit f8b21e5a5ee62931a1c40882ad0bbc00e31a3499
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Mon Sep 7 10:41:51 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:41:51 2026 +0200

    xen/riscv: fix out-of-range indexing of the IMSIC per-CPU MSI array
    
    imsic_init() indexes msi[] by the Xen CPU id hartid_to_cpuid() returns,
    but that array is allocated with one entry per parent IRQ of the IMSIC
    node, and the only range check compares the index against
    num_possible_cpus(). Neither matches the array, and the check comes
    after the first access:
    
    - hartid_to_cpuid() returns NR_CPUS when the hart isn't one Xen brought
      up, and msi[NR_CPUS].base_addr is read before that is noticed;
    - an IMSIC node listing fewer parents than Xen has CPUs makes every
      index past nr_parent_irqs go past the end of the allocation, which the
      num_possible_cpus() check lets through.
    
    Size the array by nr_cpu_ids, which is what it is indexed by,
    and move the range check ahead of the first msi[] access.
    
    Fixes: c9bd8b322ecb ("xen/riscv: imsic_init() implementation")
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/imsic.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index f7b70a8da0..8da72c0072 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -346,7 +346,7 @@ int __init imsic_init(const struct dt_device_node *node)
         goto imsic_init_err;
     }
 
-    msi = xvzalloc_array(struct imsic_msi, nr_parent_irqs);
+    msi = xvzalloc_array(struct imsic_msi, nr_cpu_ids);
     if ( !msi )
     {
         rc = -ENOMEM;
@@ -405,7 +405,18 @@ int __init imsic_init(const struct dt_device_node *node)
             continue;
         }
 
+        /*
+         * hartid_to_cpuid() returns NR_CPUS for a hart Xen doesn't know, so
+         * the range has to be checked before msi[] is indexed at all.
+         */
         cpu = hartid_to_cpuid(hartid);
+        if ( cpu >= nr_cpu_ids )
+        {
+            printk(XENLOG_WARNING
+                   "%s: unsupported hart ID=%#lx for parent irq%u\n",
+                   node->name, hartid, i);
+            continue;
+        }
 
         /*
          * If .base_addr is not 0, it indicates that the CPU has already been
@@ -421,13 +432,6 @@ int __init imsic_init(const struct dt_device_node *node)
             continue;
         }
 
-        if ( cpu >= num_possible_cpus() )
-        {
-            printk(XENLOG_WARNING "%s: unsupported hart ID=%#lx for parent irq%u\n",
-                   node->name, hartid, i);
-            continue;
-        }
-
         /* Find MMIO location of MSI page */
         reloff = i * IMSIC_HART_SIZE(imsic_cfg.guest_index_bits);
         for ( index = 0; index < nr_mmios; index++ )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 10:33:08 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 10:33:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410781.1641575 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Wes-0000ha-Lw; Mon, 07 Sep 2026 10:33:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410781.1641575; Mon, 07 Sep 2026 10:33:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Wes-0000hS-JB; Mon, 07 Sep 2026 10:33:02 +0000
Received: by outflank-mailman (input) for mailman id 1410781;
 Mon, 07 Sep 2026 10:33:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Wer-0000hM-RL
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 10:33:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Wer-0039lH-0v
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Wer-00CQOl-1n
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=315MEavI9fhuNC4/6f6i2YNyZCgQNXNLVIjFeyap6Gk=; b=59cIaf1/gVqq209Te0g8D8O+YP
	HmZpygtyU96ZHNtQx3+6S4rXSgPFktIlyJBp054lSE666g2eBBZ9qGP4UONsPsKNY46WdQvC9GflP
	ihsYwcp4wJN0uzt+7SgxCi9GrtA/aL+ov4RMVDjSv62/ozaPvJheY2g2QXGTn5t78wm4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/boot: don't cast away const-ness
Message-Id: <E1x3Wer-00CQOl-1n@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 10:33:01 +0000

commit 1e204d768b50f2be244a1deccd9de87ae006cbac
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 10:40:50 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:40:50 2026 +0200

    x86/boot: don't cast away const-ness
    
    While the general C library strchr() has to do so, the early boot cmdline
    parsing has no such requirement.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/boot/cmdline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/boot/cmdline.c b/xen/arch/x86/boot/cmdline.c
index 196c580e91..cf9e32b6d9 100644
--- a/xen/arch/x86/boot/cmdline.c
+++ b/xen/arch/x86/boot/cmdline.c
@@ -77,12 +77,12 @@ static int strncmp(const char *cs, const char *ct, size_t count)
     return 0;
 }
 
-static char *strchr(const char *s, int c)
+static const char *strchr(const char *s, int c)
 {
     for ( ; *s != (char)c; ++s )
         if ( *s == '\0' )
             return NULL;
-    return (char *)s;
+    return s;
 }
 
 static size_t strspn(const char *s, const char *accept)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 10:33:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 10:33:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410782.1641580 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Wf2-0000kI-NU; Mon, 07 Sep 2026 10:33:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410782.1641580; Mon, 07 Sep 2026 10:33:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Wf2-0000kA-KY; Mon, 07 Sep 2026 10:33:12 +0000
Received: by outflank-mailman (input) for mailman id 1410782;
 Mon, 07 Sep 2026 10:33:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Wf1-0000jy-O1
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 10:33:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Wf1-0039lL-1F
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Wf1-00CRBQ-28
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nYhag7CP+l7inFVmiKHGSpZ5zmkPxEmFXQZ+2UVyt8g=; b=vuNEvmBEEqoTBA/OmlbANruFzB
	rczrhGuTwWwUUcmHjpXaeylohrFL7ASIAZscnw9rQQZvoZV6gmrsY1BR5vm41eHn3RgI+bnoJd10i
	SalNPEw/hxB0gvmc+3zNook8hJDI7ijoM6tOfm1of45qbJRYQHxcru77T5ArosftJOJA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/altcall: hide casting away of const
Message-Id: <E1x3Wf1-00CRBQ-28@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 10:33:11 +0000

commit 74b000804485db0d1b02b4f714b975643379c405
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 10:41:04 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:41:04 2026 +0200

    x86/altcall: hide casting away of const
    
    ALT_CALL_PTR() really means to get rid of const (when necessary, i.e. when
    used from apply_alt_calls()): We want to patch the original call site,
    after all, and memory-wise that's unrelated to the struct alt_call * that
    we start from.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/include/asm/alternative-call.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/alternative-call.h b/xen/arch/x86/include/asm/alternative-call.h
index 27024797f5..809023bc4d 100644
--- a/xen/arch/x86/include/asm/alternative-call.h
+++ b/xen/arch/x86/include/asm/alternative-call.h
@@ -9,7 +9,7 @@
 struct alt_call {
     int32_t offset;
 };
-#define ALT_CALL_PTR(a) ((void *)&(a)->offset + (a)->offset)
+#define ALT_CALL_PTR(a) ((void *)((long)&(a)->offset + (a)->offset))
 #define ALT_CALL_LEN(a) (6)
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 10:33:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 10:33:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410783.1641583 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3WfC-0000nP-Ob; Mon, 07 Sep 2026 10:33:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410783.1641583; Mon, 07 Sep 2026 10:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3WfC-0000nF-Lr; Mon, 07 Sep 2026 10:33:22 +0000
Received: by outflank-mailman (input) for mailman id 1410783;
 Mon, 07 Sep 2026 10:33:21 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3WfB-0000n9-T3
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 10:33:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3WfB-0039lS-1a
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3WfB-00CS4O-2V
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=yHDlW2jGlPKvOBuKO+pfc1MTYR5+gPE7ZshyndifU3U=; b=sSfiCw6VBcSYK8eqK8HEqZ+Hi/
	iBcBiyVk3lezZYrwwscSWzmApqueCIdD8ALN3abDbYLmCzppIZjhk9CPqU5stbQPuG6LXmHcEiXYC
	bPPEeW3CPe9W5HlhJQwhFtZDjTkwc8Q04fTgRDISSiROYOZByn6DrLvEaxDYDmezwSbk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86emul: adjust file comments
Message-Id: <E1x3WfB-00CS4O-2V@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 10:33:21 +0000

commit 582b94e41b22b633f6212387425844f0e32b2ae4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 10:41:27 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:41:27 2026 +0200

    x86emul: adjust file comments
    
    With the split-off of decoding into a separate file, both files' top
    comments should have been adjusted accordingly.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_emulate/decode.c      | 2 +-
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_emulate/decode.c b/xen/arch/x86/x86_emulate/decode.c
index 947f49d870..c4b18718f8 100644
--- a/xen/arch/x86/x86_emulate/decode.c
+++ b/xen/arch/x86/x86_emulate/decode.c
@@ -2,7 +2,7 @@
 /******************************************************************************
  * decode.c - helper for x86_emulate.c
  *
- * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
+ * Generic x86 (32-bit and 64-bit) instruction decoder.
  *
  * Copyright (c) 2005-2007 Keir Fraser
  * Copyright (c) 2005-2007 XenSource Inc.
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 7de6460836..830ad90c9c 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -2,7 +2,7 @@
 /******************************************************************************
  * x86_emulate.c
  *
- * Generic x86 (32-bit and 64-bit) instruction decoder and emulator.
+ * Generic x86 (32-bit and 64-bit) instruction emulator.
  *
  * Copyright (c) 2005-2007 Keir Fraser
  * Copyright (c) 2005-2007 XenSource Inc.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 10:33:32 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 10:33:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410784.1641586 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3WfM-0000rg-Ph; Mon, 07 Sep 2026 10:33:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410784.1641586; Mon, 07 Sep 2026 10:33:32 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3WfM-0000rY-ND; Mon, 07 Sep 2026 10:33:32 +0000
Received: by outflank-mailman (input) for mailman id 1410784;
 Mon, 07 Sep 2026 10:33:31 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3WfL-0000rQ-UO
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 10:33:31 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3WfL-0039lW-1t
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:31 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3WfL-00CT04-2o
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 10:33:31 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=N/2iNo5ep7L8XF2IaReX+o3oGlFzhrSREibRZTzkA0E=; b=cFf2oS+00FaiEaVAd8p08BwB45
	dXpTo9EvsNQKJuLwrLlgyQ8d2gd8CJB+vbWjX2ioXqKbD3M/YSF7nm1hzeeQ0NWnQ9FAt9zvtIRDH
	zCFzZ+/vP+JrfDrW2kgGRwjtaWkJPTX1MLflvUVSaB+KzHJnDycfJLGX1em5cnO0WiTw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: fix out-of-range indexing of the IMSIC per-CPU MSI array
Message-Id: <E1x3WfL-00CT04-2o@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 10:33:31 +0000

commit f8b21e5a5ee62931a1c40882ad0bbc00e31a3499
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Mon Sep 7 10:41:51 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 10:41:51 2026 +0200

    xen/riscv: fix out-of-range indexing of the IMSIC per-CPU MSI array
    
    imsic_init() indexes msi[] by the Xen CPU id hartid_to_cpuid() returns,
    but that array is allocated with one entry per parent IRQ of the IMSIC
    node, and the only range check compares the index against
    num_possible_cpus(). Neither matches the array, and the check comes
    after the first access:
    
    - hartid_to_cpuid() returns NR_CPUS when the hart isn't one Xen brought
      up, and msi[NR_CPUS].base_addr is read before that is noticed;
    - an IMSIC node listing fewer parents than Xen has CPUs makes every
      index past nr_parent_irqs go past the end of the allocation, which the
      num_possible_cpus() check lets through.
    
    Size the array by nr_cpu_ids, which is what it is indexed by,
    and move the range check ahead of the first msi[] access.
    
    Fixes: c9bd8b322ecb ("xen/riscv: imsic_init() implementation")
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/imsic.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index f7b70a8da0..8da72c0072 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -346,7 +346,7 @@ int __init imsic_init(const struct dt_device_node *node)
         goto imsic_init_err;
     }
 
-    msi = xvzalloc_array(struct imsic_msi, nr_parent_irqs);
+    msi = xvzalloc_array(struct imsic_msi, nr_cpu_ids);
     if ( !msi )
     {
         rc = -ENOMEM;
@@ -405,7 +405,18 @@ int __init imsic_init(const struct dt_device_node *node)
             continue;
         }
 
+        /*
+         * hartid_to_cpuid() returns NR_CPUS for a hart Xen doesn't know, so
+         * the range has to be checked before msi[] is indexed at all.
+         */
         cpu = hartid_to_cpuid(hartid);
+        if ( cpu >= nr_cpu_ids )
+        {
+            printk(XENLOG_WARNING
+                   "%s: unsupported hart ID=%#lx for parent irq%u\n",
+                   node->name, hartid, i);
+            continue;
+        }
 
         /*
          * If .base_addr is not 0, it indicates that the CPU has already been
@@ -421,13 +432,6 @@ int __init imsic_init(const struct dt_device_node *node)
             continue;
         }
 
-        if ( cpu >= num_possible_cpus() )
-        {
-            printk(XENLOG_WARNING "%s: unsupported hart ID=%#lx for parent irq%u\n",
-                   node->name, hartid, i);
-            continue;
-        }
-
         /* Find MMIO location of MSI page */
         reloff = i * IMSIC_HART_SIZE(imsic_cfg.guest_index_bits);
         for ( index = 0; index < nr_mmios; index++ )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 11:22:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 11:22:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410791.1641591 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQK-0001BU-20; Mon, 07 Sep 2026 11:22:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410791.1641591; Mon, 07 Sep 2026 11:22:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQJ-0001BM-VV; Mon, 07 Sep 2026 11:22:03 +0000
Received: by outflank-mailman (input) for mailman id 1410791;
 Mon, 07 Sep 2026 11:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3XQI-0001AA-Nc
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 11:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQI-003Abo-02
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQI-00GgLq-0v
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0Wcf7cYaBVOZVLQyJ1Rb7iCZsrb6d3EbkDiP9FORlMg=; b=ezkLYaO54HrQ+cAwLjniaMObFN
	E9fwEiWntviBd5AXK5eUkoaHIAUPGFsy14uTRkyrS8wm8CC6DiOWJQ8GsK2u0rLavIpWwbjmLTzd+
	RAZhfNTVJ3DC2DIrhroKez37G7haIMrgt12ZIj87w1B8HuRp6DEH1y3Ytmzcn5NSGJ+0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: Fix evaluation of parameters for SMCCC calls
Message-Id: <E1x3XQI-00GgLq-0v@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 11:22:02 +0000

commit 95302b39430c9d2d4b50c2c63f56629e543b29e6
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:35 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Fix evaluation of parameters for SMCCC calls
    
    Contrary to what was claimed in commit 67bcf5eae709 ("xen/arm: Simplify type
    handling for SMCCC declarations"), there is an important reason to retain the
    intermediate variable.  It is unsafe to have any logic between the assignment
    of the register variables and the asm() block they're used in.
    
    This logically reverts commit 67bcf5eae709 ("xen/arm: Simplify type handling
    for SMCCC declarations") while retaining the conversions from commit
    7f15d5d13221 ("xen/treewide: More typeof() -> auto conversions").
    
    Adjust __declare_arg_0() to match.  It happens to be safe because it's the
    first register expression once all macros are expanded, but it really should
    be consistent with the others.
    
    Leave a comment explaining why they must be written like this.
    
    Fixes: 67bcf5eae709 ("xen/arm: Simplify type handling for SMCCC declarations")
    Reported-by: Jan Setje-Eilers <Jan.SetjeEilers@oracle.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/include/asm/smccc.h | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 62c6985e73..53cdddb690 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -108,37 +108,52 @@ struct arm_smccc_res {
 #define __constraint_read_6 __constraint_read_5, "r" (arg6)
 #define __constraint_read_7 __constraint_read_6, "r" (arg7)
 
+/*
+ * Macro arguments MUST be evaluated before being assigned to a register
+ * variable.
+ *
+ * This is manual register scheduling for the asm() statement, and any other
+ * logic to evaluate may clobber the already-scheduled registers.
+ */
 #define __declare_arg_0(a0, res)                            \
+    auto __a0 = (uint32_t)(a0);                             \
     struct arm_smccc_res    *___res = (res);                \
-    register unsigned long  arg0 ASM_REG(0) = (uint32_t)(a0)
+    register unsigned long  arg0 ASM_REG(0) = __a0
 
 #define __declare_arg_1(a0, a1, res)                        \
+    auto __a1 = (a1);                                       \
     __declare_arg_0(a0, res);                               \
-    register auto           arg1 ASM_REG(1) = (a1)
+    register auto           arg1 ASM_REG(1) = __a1
 
 #define __declare_arg_2(a0, a1, a2, res)                    \
+    auto __a2 = (a2);                                       \
     __declare_arg_1(a0, a1, res);                           \
-    register auto           arg2 ASM_REG(2) = (a2)
+    register auto           arg2 ASM_REG(2) = __a2
 
 #define __declare_arg_3(a0, a1, a2, a3, res)                \
+    auto __a3 = (a3);                                       \
     __declare_arg_2(a0, a1, a2, res);                       \
-    register auto           arg3 ASM_REG(3) = (a3)
+    register auto           arg3 ASM_REG(3) = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
+    auto __a4 = (a4);                                   \
     __declare_arg_3(a0, a1, a2, a3, res);               \
-    register auto           arg4 ASM_REG(4) = (a4)
+    register auto           arg4 ASM_REG(4) = __a4
 
 #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)    \
+    auto __a5 = (a5);                                   \
     __declare_arg_4(a0, a1, a2, a3, a4, res);           \
-    register auto           arg5 ASM_REG(5) = (a5)
+    register auto           arg5 ASM_REG(5) = __a5
 
 #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)    \
+    auto __a6 = (a6);                                       \
     __declare_arg_5(a0, a1, a2, a3, a4, a5, res);           \
-    register auto           arg6 ASM_REG(6) = (a6)
+    register auto           arg6 ASM_REG(6) = __a6
 
 #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)    \
+    auto __a7 = (a7);                                           \
     __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);           \
-    register auto           arg7 ASM_REG(7) = (a7)
+    register auto           arg7 ASM_REG(7) = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 11:22:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 11:22:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410792.1641594 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQU-0001DF-3E; Mon, 07 Sep 2026 11:22:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410792.1641594; Mon, 07 Sep 2026 11:22:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQU-0001D5-0a; Mon, 07 Sep 2026 11:22:14 +0000
Received: by outflank-mailman (input) for mailman id 1410792;
 Mon, 07 Sep 2026 11:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3XQS-0001Cv-FD
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 11:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQS-003Abw-0M
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQS-00GhBP-1I
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=I3OtZVTPjHvBTdcJ8dOrpKcZ4KYvYKZBbB2BG3hdVxM=; b=rr6Ae0dciIE5+6dfxw70VR/dTp
	GpY8maqycmMZcM+af+T34u7Sd5uxcnn1jFwDpDuHOQDntg0T8DLpd0itxwT9jzPeNHrYVXP6qTUbl
	ZG9LQvFCgP2b1Qj7Uuj8EIBaBHo8nSQ629v8SO8H7/VMNKIH2kr/vRcNGb/iU1UDRZX0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: Introduce arm_smccc_guest_smc()
Message-Id: <E1x3XQS-00GhBP-1I@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 11:22:12 +0000

commit b128b74cf85e3336b8262a0e92f8b6d651e3da5b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:40 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Introduce arm_smccc_guest_smc()
    
    Both {get,set}_user_reg() are out-of-line functions, leading to awful code
    generation.
    
    Introduce arm_smccc_guest_smc() to operate directly on guest registers.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/firmware/scmi-smc.c            | 16 +---------------
 xen/arch/arm/include/asm/smccc.h            | 29 +++++++++++++++++++++++++++++
 xen/arch/arm/platforms/imx8m.c              | 16 +---------------
 xen/arch/arm/platforms/imx8qm.c             | 16 +---------------
 xen/arch/arm/platforms/xilinx-zynqmp-eemi.c | 17 ++---------------
 5 files changed, 34 insertions(+), 60 deletions(-)

diff --git a/xen/arch/arm/firmware/scmi-smc.c b/xen/arch/arm/firmware/scmi-smc.c
index 0835ddeeec..a0cc6c6192 100644
--- a/xen/arch/arm/firmware/scmi-smc.c
+++ b/xen/arch/arm/firmware/scmi-smc.c
@@ -50,7 +50,6 @@ static bool scmi_is_valid_smc_id(uint32_t fid)
 static bool scmi_handle_smc(struct cpu_user_regs *regs)
 {
     uint32_t fid = (uint32_t)get_user_reg(regs, 0);
-    struct arm_smccc_res res;
 
     if ( !scmi_is_valid_smc_id(fid) )
         return false;
@@ -63,20 +62,7 @@ static bool scmi_handle_smc(struct cpu_user_regs *regs)
     }
 
     /* For the moment, forward the SCMI Request to FW running at EL3 */
-    arm_smccc_1_1_smc(fid,
-                      get_user_reg(regs, 1),
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
 
     return true;
 }
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 53cdddb690..832157f437 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -202,6 +202,21 @@ struct arm_smccc_res {
 #ifdef CONFIG_ARM_32
 #define arm_smccc_1_0_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 #define arm_smccc_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
+
+/* Make an SMCCC v1.1 compliant SMC call with guest register state. */
+static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
+{
+    struct arm_smccc_res res;
+
+    arm_smccc_1_1_smc(regs->r0, regs->r1, regs->r2, regs->r3,
+                      regs->r4, regs->r5, regs->r6, regs->r7, &res);
+
+    regs->r0 = res.a0;
+    regs->r1 = res.a1;
+    regs->r2 = res.a2;
+    regs->r3 = res.a3;
+}
+
 #else
 
 void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
@@ -251,6 +266,20 @@ void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
             arm_smccc_1_0_smc(__VA_ARGS__);                     \
     } while ( 0 )
 
+/* Make an SMCCC v1.1 compliant SMC call with guest register state. */
+static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
+{
+    struct arm_smccc_res res;
+
+    arm_smccc_1_1_smc(regs->x0, regs->x1, regs->x2, regs->x3,
+                      regs->x4, regs->x5, regs->x6, regs->x7, &res);
+
+    regs->x0 = res.a0;
+    regs->x1 = res.a1;
+    regs->x2 = res.a2;
+    regs->x3 = res.a3;
+}
+
 /*
  * struct arm_smccc_1_2_regs - Arguments for or Results from SMC call
  * @a0-a17 argument values from registers 0 to 17
diff --git a/xen/arch/arm/platforms/imx8m.c b/xen/arch/arm/platforms/imx8m.c
index 669dd517e0..efb0ad20d6 100644
--- a/xen/arch/arm/platforms/imx8m.c
+++ b/xen/arch/arm/platforms/imx8m.c
@@ -50,7 +50,6 @@ static bool imx8m_smc(struct cpu_user_regs *regs)
 {
     uint32_t function_id = get_user_reg(regs, 0);
     uint32_t subfunction_id = get_user_reg(regs, 1);
-    struct arm_smccc_res res;
 
     if ( !cpus_have_const_cap(ARM_SMCCC_1_1) )
     {
@@ -122,20 +121,7 @@ static bool imx8m_smc(struct cpu_user_regs *regs)
         return false;
     }
 
-    arm_smccc_1_1_smc(function_id,
-                      subfunction_id,
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
 
     return true;
 }
diff --git a/xen/arch/arm/platforms/imx8qm.c b/xen/arch/arm/platforms/imx8qm.c
index 3600a073e8..7249e14ab6 100644
--- a/xen/arch/arm/platforms/imx8qm.c
+++ b/xen/arch/arm/platforms/imx8qm.c
@@ -67,7 +67,6 @@ static bool imx8qm_smc(struct cpu_user_regs *regs)
 {
     uint32_t function_id = get_user_reg(regs, 0);
     uint32_t subfunction_id = get_user_reg(regs, 1);
-    struct arm_smccc_res res;
 
     if ( !cpus_have_const_cap(ARM_SMCCC_1_1) )
     {
@@ -106,20 +105,7 @@ static bool imx8qm_smc(struct cpu_user_regs *regs)
     }
 
  allow_call:
-    arm_smccc_1_1_smc(function_id,
-                      subfunction_id,
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
 
     return true;
 }
diff --git a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
index 2053ed7ac5..326c8a1ba6 100644
--- a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
+++ b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
@@ -51,7 +51,6 @@ static inline bool domain_has_reset_access(struct domain *d, uint32_t rst)
 
 bool zynqmp_eemi(struct cpu_user_regs *regs)
 {
-    struct arm_smccc_res res;
     uint32_t fid = get_user_reg(regs, 0);
     uint32_t nodeid = get_user_reg(regs, 1);
     unsigned int pm_fn = fid & 0xFFFF;
@@ -187,20 +186,8 @@ forward_to_fw:
      * can forward the whole command to firmware without additional
      * parameters checks.
      */
-    arm_smccc_1_1_smc(get_user_reg(regs, 0),
-                      get_user_reg(regs, 1),
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
+
     return true;
 
 done:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 11:22:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 11:22:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410793.1641599 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQe-0001GA-4n; Mon, 07 Sep 2026 11:22:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410793.1641599; Mon, 07 Sep 2026 11:22:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQe-0001G2-1s; Mon, 07 Sep 2026 11:22:24 +0000
Received: by outflank-mailman (input) for mailman id 1410793;
 Mon, 07 Sep 2026 11:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3XQc-0001Fu-Ik
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 11:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQc-003Ac4-0h
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQc-00Ghv2-1a
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=WoSHL+GmvvPqtABKCM12/zOf2LDBwOAWlGu6VpMVbgA=; b=2yT9DKQB/8QK9x1I8pO4cY2ms9
	heRcCHd7E7bItkIMrmN/La19lW3mSzSMxbaVhJrJFFahhbJujyQ+qOSEnl02w9QAty9RC5pozpLIJ
	pYUVyQtlL9L6r2F7d5fdWcWyj4EjyYLTiA54RMKJPeV3IcJlkAyAPW4HFsMl8XnCUvCc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: Clean up 32bit arm_smccc_1_1_smc()
Message-Id: <E1x3XQc-00Ghv2-1a@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 11:22:22 +0000

commit 979251a377012c5afb2b7db25455ebd2a4b9b724
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:37 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Clean up 32bit arm_smccc_1_1_smc()
    
    ... before making a related copy of it.
    
     * Drop __constraints() so the output parameters are visible in the same block
       as they're defined.  Use PASTE() rather than opencoding it.
     * Adjust the indentation of trailing \'s for consistency.
     * Drop the newline at the end of the instruction.
     * Indent the if condition correctly.  ___res is always of type
       arm_smccc_res (declared in __declare_arg_0()), so drop the typeof().
     * Drop arm_smccc_1_0_smc() as it has no users.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/include/asm/smccc.h | 45 ++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 832157f437..5fe54013ac 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -56,6 +56,8 @@
 
 #ifndef __ASSEMBLER__
 
+#include <xen/macros.h>
+
 extern uint32_t smccc_ver;
 
 /* Check if this is fast call. */
@@ -115,24 +117,24 @@ struct arm_smccc_res {
  * This is manual register scheduling for the asm() statement, and any other
  * logic to evaluate may clobber the already-scheduled registers.
  */
-#define __declare_arg_0(a0, res)                            \
-    auto __a0 = (uint32_t)(a0);                             \
-    struct arm_smccc_res    *___res = (res);                \
+#define __declare_arg_0(a0, res)                        \
+    auto __a0 = (uint32_t)(a0);                         \
+    struct arm_smccc_res    *___res = (res);            \
     register unsigned long  arg0 ASM_REG(0) = __a0
 
-#define __declare_arg_1(a0, a1, res)                        \
-    auto __a1 = (a1);                                       \
-    __declare_arg_0(a0, res);                               \
+#define __declare_arg_1(a0, a1, res)                    \
+    auto __a1 = (a1);                                   \
+    __declare_arg_0(a0, res);                           \
     register auto           arg1 ASM_REG(1) = __a1
 
-#define __declare_arg_2(a0, a1, a2, res)                    \
-    auto __a2 = (a2);                                       \
-    __declare_arg_1(a0, a1, res);                           \
+#define __declare_arg_2(a0, a1, a2, res)                \
+    auto __a2 = (a2);                                   \
+    __declare_arg_1(a0, a1, res);                       \
     register auto           arg2 ASM_REG(2) = __a2
 
-#define __declare_arg_3(a0, a1, a2, a3, res)                \
-    auto __a3 = (a3);                                       \
-    __declare_arg_2(a0, a1, a2, res);                       \
+#define __declare_arg_3(a0, a1, a2, a3, res)            \
+    auto __a3 = (a3);                                   \
+    __declare_arg_2(a0, a1, a2, res);                   \
     register auto           arg3 ASM_REG(3) = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
@@ -158,12 +160,6 @@ struct arm_smccc_res {
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
 
-#define ___constraints(count)                       \
-    : "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)     \
-    : __constraint_read_ ## count                   \
-    : "memory"
-#define __constraints(count)    ___constraints(count)
-
 /*
  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
  *
@@ -189,10 +185,14 @@ struct arm_smccc_res {
         register unsigned long r2 ASM_REG(2);                   \
         register unsigned long r3 ASM_REG(3);                   \
         __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
-        asm volatile("smc #0\n"                                 \
-                     __constraints(__count_args(__VA_ARGS__))); \
+        asm volatile (                                          \
+            "smc #0"                                            \
+            : "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)        \
+            : PASTE(__constraint_read_,                         \
+                    __count_args(__VA_ARGS__))                  \
+            : "memory" );                                       \
         if ( ___res )                                           \
-        *___res = (typeof(*___res)){r0, r1, r2, r3};            \
+            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
     } while ( 0 )
 
 /*
@@ -200,7 +200,6 @@ struct arm_smccc_res {
  * v1.1.
  */
 #ifdef CONFIG_ARM_32
-#define arm_smccc_1_0_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 #define arm_smccc_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 
 /* Make an SMCCC v1.1 compliant SMC call with guest register state. */
@@ -217,7 +216,7 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
     regs->r3 = res.a3;
 }
 
-#else
+#else /* CONFIG_ARM_64 */
 
 void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
                          register_t a3, register_t a4, register_t a5,
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 11:22:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 11:22:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410794.1641603 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQo-0001JR-5v; Mon, 07 Sep 2026 11:22:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410794.1641603; Mon, 07 Sep 2026 11:22:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQo-0001JJ-3E; Mon, 07 Sep 2026 11:22:34 +0000
Received: by outflank-mailman (input) for mailman id 1410794;
 Mon, 07 Sep 2026 11:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3XQm-0001JA-Lm
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 11:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQm-003Ac8-10
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQm-00GihQ-1u
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=kfZ+LWnp6ikBZUn/cgWFL079OW/TD9WNTqSyCfREpSc=; b=yB8kWbIQ9BJc7QitC/2iagQAar
	TLWfQ01jprMUxjDmunWBawmtzl4r5SVa4i+CHpKjOjAF8tl/lEYdiUkZCUe0AbuUl4J73vlLyylsN
	XCvmuTnLeYxwtTOnwuVH3tqyixyjbpFn6IxRW8ibOXT1nHnUGtiFLSEq44fVfH2XiIxs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: Rewrite arm_smccc_smc() for arm64
Message-Id: <E1x3XQm-00GihQ-1u@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 11:22:32 +0000

commit 1b5ff89cc33df0fa58af0fc22d62f6ec8475e7c3
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:38 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Rewrite arm_smccc_smc() for arm64
    
    SMCCC v1.0 says that x4 through x17 may be clobbered.  SMCCC v1.1 says they
    are strictly preserved, and SMCCC v1.2 permits them to contain extra return
    values.
    
    Xen deals with this by having __arm_smccc_1_0_smc() as an out-of-line
    function, but this causes awful code generation in arm_smccc_smc().
    cpus_have_const_cap() is opaque to the optimiser, so we end up with one basic
    block doing the reasonably-ok arm_smccc_1_1_smc() code generation and a second
    basic block setting up all 8 input registers even when they're not needed,
    spilling or discarding x8 through x17, and calling an out-of-line function.
    
    Remove __arm_smccc_1_0_smc() entirely, and rewrite arm_smccc_smc() to declare
    x4 through x17 as clobbered.
    
    This fully inlines the SMC, is a single basic block which instructs the
    compiler to spill or discard the potentially clobbered registers, and only
    sets up the necessary number of arguments for the call.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/arm64/smc.S         | 16 -------
 xen/arch/arm/include/asm/smccc.h | 92 ++++++++++++++++++++--------------------
 2 files changed, 45 insertions(+), 63 deletions(-)

diff --git a/xen/arch/arm/arm64/smc.S b/xen/arch/arm/arm64/smc.S
index 68b05e8ddd..65b4eabe4f 100644
--- a/xen/arch/arm/arm64/smc.S
+++ b/xen/arch/arm/arm64/smc.S
@@ -13,22 +13,6 @@
  * GNU General Public License for more details.
  */
 
-/*
- * void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
- *                          register_t a3, register_t a4, register_t a5,
- *                          register_t a6, register_t a7,
- *                          struct arm_smccc_res *res)
- */
-FUNC(__arm_smccc_1_0_smc)
-        smc     #0
-        ldr     x4, [sp]
-        cbz     x4, 1f          /* No need to store the result */
-        stp     x0, x1, [x4, #SMCCC_RES_a0]
-        stp     x2, x3, [x4, #SMCCC_RES_a2]
-1:
-        ret
-END(__arm_smccc_1_0_smc)
-
 /*
  * void arm_smccc_1_2_smc(const struct arm_smccc_1_2_regs *args,
  *                        struct arm_smccc_1_2_regs *res)
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 5fe54013ac..4ed2a40ed0 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -16,9 +16,6 @@
 #ifndef __ASM_ARM_SMCCC_H__
 #define __ASM_ARM_SMCCC_H__
 
-#include <asm/alternative.h>
-#include <asm/cpufeature.h>
-
 #define SMCCC_VERSION_MAJOR_SHIFT            16
 #define SMCCC_VERSION_MINOR_MASK             \
         ((1U << SMCCC_VERSION_MAJOR_SHIFT) - 1)
@@ -57,6 +54,9 @@
 #ifndef __ASSEMBLER__
 
 #include <xen/macros.h>
+#include <xen/types.h>
+
+#include <asm/asm_defns.h>
 
 extern uint32_t smccc_ver;
 
@@ -160,6 +160,8 @@ struct arm_smccc_res {
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
 
+#ifdef CONFIG_ARM_32
+
 /*
  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
  *
@@ -199,7 +201,6 @@ struct arm_smccc_res {
  * The calling convention for arm32 is the same for both SMCCC v1.0 and
  * v1.1.
  */
-#ifdef CONFIG_ARM_32
 #define arm_smccc_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 
 /* Make an SMCCC v1.1 compliant SMC call with guest register state. */
@@ -218,53 +219,50 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 
 #else /* CONFIG_ARM_64 */
 
-void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
-                         register_t a3, register_t a4, register_t a5,
-                         register_t a6, register_t a7,
-                         struct arm_smccc_res *res);
-
-/* Macros to handle variadic parameter for SMCCC v1.0 helper */
-#define __arm_smccc_1_0_smc_7(a0, a1, a2, a3, a4, a5, a6, a7, res)  \
-    __arm_smccc_1_0_smc(a0, a1, a2, a3, a4, a5, a6, a7, res)
-
-#define __arm_smccc_1_0_smc_6(a0, a1, a2, a3, a4, a5, a6, res)  \
-    __arm_smccc_1_0_smc_7(a0, a1, a2, a3, a4, a5, a6, 0, res)
-
-#define __arm_smccc_1_0_smc_5(a0, a1, a2, a3, a4, a5, res)  \
-    __arm_smccc_1_0_smc_6(a0, a1, a2, a3, a4, a5, 0, res)
-
-#define __arm_smccc_1_0_smc_4(a0, a1, a2, a3, a4, res)  \
-    __arm_smccc_1_0_smc_5(a0, a1, a2, a3, a4, 0, res)
-
-#define __arm_smccc_1_0_smc_3(a0, a1, a2, a3, res)  \
-    __arm_smccc_1_0_smc_4(a0, a1, a2, a3, 0, res)
-
-#define __arm_smccc_1_0_smc_2(a0, a1, a2, res)  \
-    __arm_smccc_1_0_smc_3(a0, a1, a2, 0, res)
-
-#define __arm_smccc_1_0_smc_1(a0, a1, res)  \
-    __arm_smccc_1_0_smc_2(a0, a1, 0, res)
-
-#define __arm_smccc_1_0_smc_0(a0, res)  \
-    __arm_smccc_1_0_smc_1(a0, 0, res)
-
-#define ___arm_smccc_1_0_smc_count(count, ...)    \
-    __arm_smccc_1_0_smc_ ## count(__VA_ARGS__)
-
-#define __arm_smccc_1_0_smc_count(count, ...)   \
-    ___arm_smccc_1_0_smc_count(count, __VA_ARGS__)
-
-#define arm_smccc_1_0_smc(...)                                              \
-        __arm_smccc_1_0_smc_count(__count_args(__VA_ARGS__), __VA_ARGS__)
-
+/*
+ * Make an SMC call compatible with both SMCCC v1.1 and v1.0.
+ *
+ * SMCCC v1.0 says that x4 through x17 are clobbered.  SMCCC v1.1 says they
+ * are strictly preserved.  Always mark x4 through x17 as clobbered.
+ */
 #define arm_smccc_smc(...)                                      \
     do {                                                        \
-        if ( cpus_have_const_cap(ARM_SMCCC_1_1) )               \
-            arm_smccc_1_1_smc(__VA_ARGS__);                     \
-        else                                                    \
-            arm_smccc_1_0_smc(__VA_ARGS__);                     \
+        register unsigned long r0  ASM_REG(0);                  \
+        register unsigned long r1  ASM_REG(1);                  \
+        register unsigned long r2  ASM_REG(2);                  \
+        register unsigned long r3  ASM_REG(3);                  \
+        /* Potentially clobbered in SMCCC v1.0 */               \
+        register unsigned long c4  ASM_REG(4);                  \
+        register unsigned long c5  ASM_REG(5);                  \
+        register unsigned long c6  ASM_REG(6);                  \
+        register unsigned long c7  ASM_REG(7);                  \
+        register unsigned long c8  ASM_REG(8);                  \
+        register unsigned long c9  ASM_REG(9);                  \
+        register unsigned long c10 ASM_REG(10);                 \
+        register unsigned long c11 ASM_REG(11);                 \
+        register unsigned long c12 ASM_REG(12);                 \
+        register unsigned long c13 ASM_REG(13);                 \
+        register unsigned long c14 ASM_REG(14);                 \
+        register unsigned long c15 ASM_REG(15);                 \
+        register unsigned long c16 ASM_REG(16);                 \
+        register unsigned long c17 ASM_REG(17);                 \
+        __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+        asm volatile (                                          \
+            "smc #0"                                            \
+            : "=r" (r0),  "=r" (r1),  "=r" (r2),  "=r" (r3),    \
+              "=r" (c4),  "=r" (c5),  "=r" (c6),  "=r" (c7),    \
+              "=r" (c8),  "=r" (c9),  "=r" (c10), "=r" (c11),   \
+              "=r" (c12), "=r" (c13), "=r" (c14), "=r" (c15),   \
+              "=r" (c16), "=r" (c17)                            \
+            : PASTE(__constraint_read_,                         \
+                    __count_args(__VA_ARGS__))                  \
+            : "memory" );                                       \
+        if ( ___res )                                           \
+            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
     } while ( 0 )
 
+#define arm_smccc_1_1_smc(...) arm_smccc_smc(__VA_ARGS__)
+
 /* Make an SMCCC v1.1 compliant SMC call with guest register state. */
 static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 11:22:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 11:22:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410795.1641607 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQy-0001N0-8O; Mon, 07 Sep 2026 11:22:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410795.1641607; Mon, 07 Sep 2026 11:22:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3XQy-0001Ms-5o; Mon, 07 Sep 2026 11:22:44 +0000
Received: by outflank-mailman (input) for mailman id 1410795;
 Mon, 07 Sep 2026 11:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3XQw-0001Mi-Ot
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 11:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQw-003AcC-1L
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3XQw-00GjQM-2H
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 11:22:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=a97OwHhckbd5PXt1RiVLcvdeAj9QOVnaXvWFO3N8o2U=; b=OWER1imzaAAxbIPSxIxi+THa8N
	VJ7403YHnn1wpThdytV7oGeF/1Qs3wVJf1/KtapncoHtYMv6CWgF5KCLGdorlRAPYwVW371bBO736
	ku3Wvlz83lP9yQX+nVfeX/q60jOZsYQm3bCm7wPYse8Lz+h2UD/WTzYy9zV3vKjnvyY8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: Rewrite arm_smccc_*() to return by value
Message-Id: <E1x3XQw-00GjQM-2H@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 11:22:42 +0000

commit 715f2c3c25698f16ff0ee3ee0e8f329e4b51c539
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:47 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Rewrite arm_smccc_*() to return by value
    
    Use statement expressions to return struct arm_smccc_res which makes the code
    read a lot more normally, and avoids needing to pass in NULL in order to skip
    return information.
    
    More importantly, it removes the local implementation of __count_args() which
    is off by two and deeply confusing to try and follow.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/cpuerrata.c         | 18 ++++----
 xen/arch/arm/include/asm/smccc.h | 92 ++++++++++++++++++----------------------
 xen/arch/arm/platforms/exynos5.c |  2 +-
 xen/arch/arm/platforms/seattle.c |  4 +-
 xen/arch/arm/psci.c              | 17 ++++----
 xen/arch/arm/tee/optee.c         | 50 +++++++++++-----------
 xen/arch/arm/traps.c             |  4 +-
 7 files changed, 88 insertions(+), 99 deletions(-)

diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 3a32183618..35ad98d29d 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -179,8 +179,8 @@ static int enable_smccc_arch_workaround_1(void *data)
     if ( smccc_ver < SMCCC_VERSION(1, 1) )
         goto warn;
 
-    arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
-                      ARM_SMCCC_ARCH_WORKAROUND_1_FID, &res);
+    res = arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
+                            ARM_SMCCC_ARCH_WORKAROUND_1_FID);
     /* The return value is in the lower 32-bits. */
     if ( (int)res.a0 < 0 )
         goto warn;
@@ -256,8 +256,8 @@ static int enable_spectre_bhb_workaround(void *data)
         if ( smccc_ver < SMCCC_VERSION(1, 1) )
             goto warn;
 
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
-                          ARM_SMCCC_ARCH_WORKAROUND_3_FID, &res);
+        res = arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
+                                ARM_SMCCC_ARCH_WORKAROUND_3_FID);
         /* The return value is in the lower 32-bits. */
         if ( (int)res.a0 < 0 )
         {
@@ -398,8 +398,8 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
     if ( smccc_ver < SMCCC_VERSION(1, 1) )
         return false;
 
-    arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
-                      ARM_SMCCC_ARCH_WORKAROUND_2_FID, &res);
+    res = arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
+                            ARM_SMCCC_ARCH_WORKAROUND_2_FID);
 
     switch ( (int)res.a0 )
     {
@@ -429,7 +429,7 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
     case ARM_SSBD_FORCE_DISABLE:
         printk_once("%s disabled from command-line\n", entry->desc);
 
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0);
         required = false;
         break;
 
@@ -437,7 +437,7 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
         if ( required )
         {
             this_cpu(ssbd_callback_required) = 1;
-            arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL);
+            arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1);
         }
 
         break;
@@ -445,7 +445,7 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
     case ARM_SSBD_FORCE_ENABLE:
         printk_once("%s forced from command-line\n", entry->desc);
 
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1);
         required = true;
         break;
 
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 4ed2a40ed0..c7763acd7f 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -95,20 +95,14 @@ struct arm_smccc_res {
     unsigned long a3;
 };
 
-/* SMCCC v1.1 implementation madness follows */
-#define ___count_args(_0, _1, _2, _3, _4, _5, _6, _7, _8, x, ...) x
-
-#define __count_args(...)                               \
-    ___count_args(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1, 0)
-
-#define __constraint_read_0 "r" (arg0)
-#define __constraint_read_1 __constraint_read_0, "r" (arg1)
-#define __constraint_read_2 __constraint_read_1, "r" (arg2)
-#define __constraint_read_3 __constraint_read_2, "r" (arg3)
-#define __constraint_read_4 __constraint_read_3, "r" (arg4)
-#define __constraint_read_5 __constraint_read_4, "r" (arg5)
-#define __constraint_read_6 __constraint_read_5, "r" (arg6)
-#define __constraint_read_7 __constraint_read_6, "r" (arg7)
+#define __constraint_read_1 "r" (arg0)
+#define __constraint_read_2 __constraint_read_1, "r" (arg1)
+#define __constraint_read_3 __constraint_read_2, "r" (arg2)
+#define __constraint_read_4 __constraint_read_3, "r" (arg3)
+#define __constraint_read_5 __constraint_read_4, "r" (arg4)
+#define __constraint_read_6 __constraint_read_5, "r" (arg5)
+#define __constraint_read_7 __constraint_read_6, "r" (arg6)
+#define __constraint_read_8 __constraint_read_7, "r" (arg7)
 
 /*
  * Macro arguments MUST be evaluated before being assigned to a register
@@ -117,44 +111,43 @@ struct arm_smccc_res {
  * This is manual register scheduling for the asm() statement, and any other
  * logic to evaluate may clobber the already-scheduled registers.
  */
-#define __declare_arg_0(a0, res)                        \
+#define __declare_arg_1(a0)                             \
     auto __a0 = (uint32_t)(a0);                         \
-    struct arm_smccc_res    *___res = (res);            \
     register unsigned long  arg0 ASM_REG(0) = __a0
 
-#define __declare_arg_1(a0, a1, res)                    \
+#define __declare_arg_2(a0, a1)                         \
     auto __a1 = (a1);                                   \
-    __declare_arg_0(a0, res);                           \
+    __declare_arg_1(a0);                                \
     register auto           arg1 ASM_REG(1) = __a1
 
-#define __declare_arg_2(a0, a1, a2, res)                \
+#define __declare_arg_3(a0, a1, a2)                     \
     auto __a2 = (a2);                                   \
-    __declare_arg_1(a0, a1, res);                       \
+    __declare_arg_2(a0, a1);                            \
     register auto           arg2 ASM_REG(2) = __a2
 
-#define __declare_arg_3(a0, a1, a2, a3, res)            \
+#define __declare_arg_4(a0, a1, a2, a3)                 \
     auto __a3 = (a3);                                   \
-    __declare_arg_2(a0, a1, a2, res);                   \
+    __declare_arg_3(a0, a1, a2);                        \
     register auto           arg3 ASM_REG(3) = __a3
 
-#define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
+#define __declare_arg_5(a0, a1, a2, a3, a4)             \
     auto __a4 = (a4);                                   \
-    __declare_arg_3(a0, a1, a2, a3, res);               \
+    __declare_arg_4(a0, a1, a2, a3);                    \
     register auto           arg4 ASM_REG(4) = __a4
 
-#define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)    \
+#define __declare_arg_6(a0, a1, a2, a3, a4, a5)         \
     auto __a5 = (a5);                                   \
-    __declare_arg_4(a0, a1, a2, a3, a4, res);           \
+    __declare_arg_5(a0, a1, a2, a3, a4);                \
     register auto           arg5 ASM_REG(5) = __a5
 
-#define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)    \
-    auto __a6 = (a6);                                       \
-    __declare_arg_5(a0, a1, a2, a3, a4, a5, res);           \
+#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6)     \
+    auto __a6 = (a6);                                   \
+    __declare_arg_6(a0, a1, a2, a3, a4, a5);            \
     register auto           arg6 ASM_REG(6) = __a6
 
-#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)    \
-    auto __a7 = (a7);                                           \
-    __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);           \
+#define __declare_arg_8(a0, a1, a2, a3, a4, a5, a6, a7) \
+    auto __a7 = (a7);                                   \
+    __declare_arg_7(a0, a1, a2, a3, a4, a5, a6);        \
     register auto           arg7 ASM_REG(7) = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
@@ -166,36 +159,34 @@ struct arm_smccc_res {
  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
  *
  * This is a variadic macro taking one to eight source arguments, and
- * an optional return structure.
+ * returns four values.
  *
  * @a0-a7: arguments passed in registers 0 to 7
  * @res: result values from registers 0 to 3
  *
  * This macro is used to make SMC calls following SMC Calling Convention v1.1.
  * The content of the supplied param are copied to registers 0 to 7 prior
- * to the SMC instruction. The return values are updated with the content
- * from register 0 to 3 on return from the SMC instruction if not NULL.
+ * to the SMC instruction.
  *
  * We have an output list that is not necessarily used, and GCC feels
  * entitled to optimise the whole sequence away. "volatile" is what
  * makes it stick.
  */
 #define arm_smccc_1_1_smc(...)                                  \
-    do {                                                        \
+    ({                                                          \
         register unsigned long r0 ASM_REG(0);                   \
         register unsigned long r1 ASM_REG(1);                   \
         register unsigned long r2 ASM_REG(2);                   \
         register unsigned long r3 ASM_REG(3);                   \
-        __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+        __declare_args(count_args(__VA_ARGS__), __VA_ARGS__);   \
         asm volatile (                                          \
             "smc #0"                                            \
             : "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)        \
             : PASTE(__constraint_read_,                         \
-                    __count_args(__VA_ARGS__))                  \
+                    count_args(__VA_ARGS__))                    \
             : "memory" );                                       \
-        if ( ___res )                                           \
-            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
-    } while ( 0 )
+        (struct arm_smccc_res){ r0, r1, r2, r3 };               \
+    })
 
 /*
  * The calling convention for arm32 is the same for both SMCCC v1.0 and
@@ -208,8 +199,8 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 {
     struct arm_smccc_res res;
 
-    arm_smccc_1_1_smc(regs->r0, regs->r1, regs->r2, regs->r3,
-                      regs->r4, regs->r5, regs->r6, regs->r7, &res);
+    res = arm_smccc_1_1_smc(regs->r0, regs->r1, regs->r2, regs->r3,
+                            regs->r4, regs->r5, regs->r6, regs->r7);
 
     regs->r0 = res.a0;
     regs->r1 = res.a1;
@@ -226,7 +217,7 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
  * are strictly preserved.  Always mark x4 through x17 as clobbered.
  */
 #define arm_smccc_smc(...)                                      \
-    do {                                                        \
+    ({                                                          \
         register unsigned long r0  ASM_REG(0);                  \
         register unsigned long r1  ASM_REG(1);                  \
         register unsigned long r2  ASM_REG(2);                  \
@@ -246,7 +237,7 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
         register unsigned long c15 ASM_REG(15);                 \
         register unsigned long c16 ASM_REG(16);                 \
         register unsigned long c17 ASM_REG(17);                 \
-        __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+        __declare_args(count_args(__VA_ARGS__), __VA_ARGS__);   \
         asm volatile (                                          \
             "smc #0"                                            \
             : "=r" (r0),  "=r" (r1),  "=r" (r2),  "=r" (r3),    \
@@ -255,11 +246,10 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
               "=r" (c12), "=r" (c13), "=r" (c14), "=r" (c15),   \
               "=r" (c16), "=r" (c17)                            \
             : PASTE(__constraint_read_,                         \
-                    __count_args(__VA_ARGS__))                  \
+                    count_args(__VA_ARGS__))                    \
             : "memory" );                                       \
-        if ( ___res )                                           \
-            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
-    } while ( 0 )
+        (struct arm_smccc_res){ r0, r1, r2, r3 };               \
+    })
 
 #define arm_smccc_1_1_smc(...) arm_smccc_smc(__VA_ARGS__)
 
@@ -268,8 +258,8 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 {
     struct arm_smccc_res res;
 
-    arm_smccc_1_1_smc(regs->x0, regs->x1, regs->x2, regs->x3,
-                      regs->x4, regs->x5, regs->x6, regs->x7, &res);
+    res = arm_smccc_1_1_smc(regs->x0, regs->x1, regs->x2, regs->x3,
+                            regs->x4, regs->x5, regs->x6, regs->x7);
 
     regs->x0 = res.a0;
     regs->x1 = res.a1;
diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
index f7c0952067..f08d50c1fe 100644
--- a/xen/arch/arm/platforms/exynos5.c
+++ b/xen/arch/arm/platforms/exynos5.c
@@ -249,7 +249,7 @@ static int exynos5_cpu_up(int cpu)
     iounmap(power);
 
     if ( secure_firmware )
-        arm_smccc_smc(SMC_CMD_CPU1BOOT, cpu, NULL);
+        arm_smccc_smc(SMC_CMD_CPU1BOOT, cpu);
 
     return cpu_up_send_sgi(cpu);
 }
diff --git a/xen/arch/arm/platforms/seattle.c b/xen/arch/arm/platforms/seattle.c
index 64cc1868c2..dfa5cf4265 100644
--- a/xen/arch/arm/platforms/seattle.c
+++ b/xen/arch/arm/platforms/seattle.c
@@ -33,12 +33,12 @@ static const char * const seattle_dt_compat[] __initconst =
  */
 static void seattle_system_reset(void)
 {
-    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET, NULL);
+    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET);
 }
 
 static void seattle_system_off(void)
 {
-    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF, NULL);
+    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF);
 }
 
 PLATFORM_START(seattle, "SEATTLE")
diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
index b6860a7760..634d0d7467 100644
--- a/xen/arch/arm/psci.c
+++ b/xen/arch/arm/psci.c
@@ -41,8 +41,8 @@ int call_psci_cpu_on(int cpu)
 {
     struct arm_smccc_res res;
 
-    arm_smccc_smc(psci_cpu_on_nr, cpu_logical_map(cpu), __pa(init_secondary),
-                  &res);
+    res = arm_smccc_smc(psci_cpu_on_nr, cpu_logical_map(cpu),
+                        __pa(init_secondary));
 
     return PSCI_RET(res);
 }
@@ -54,7 +54,7 @@ void call_psci_cpu_off(void)
         struct arm_smccc_res res;
 
         /* If successfull the PSCI cpu_off call doesn't return */
-        arm_smccc_smc(PSCI_0_2_FN32_CPU_OFF, &res);
+        res = arm_smccc_smc(PSCI_0_2_FN32_CPU_OFF);
         panic("PSCI cpu off failed for CPU%d err=%d\n", smp_processor_id(),
               PSCI_RET(res));
     }
@@ -63,13 +63,13 @@ void call_psci_cpu_off(void)
 void call_psci_system_off(void)
 {
     if ( psci_ver > PSCI_VERSION(0, 1) )
-        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF, NULL);
+        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF);
 }
 
 void call_psci_system_reset(void)
 {
     if ( psci_ver > PSCI_VERSION(0, 1) )
-        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET, NULL);
+        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET);
 }
 
 static int __init psci_features(uint32_t psci_func_id)
@@ -79,7 +79,7 @@ static int __init psci_features(uint32_t psci_func_id)
     if ( psci_ver < PSCI_VERSION(1, 0) )
         return PSCI_NOT_SUPPORTED;
 
-    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, &res);
+    res = arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id);
 
     return PSCI_RET(res);
 }
@@ -116,9 +116,8 @@ static void __init psci_init_smccc(void)
 
     if ( psci_features(ARM_SMCCC_VERSION_FID) != PSCI_NOT_SUPPORTED )
     {
-        struct arm_smccc_res res;
+        struct arm_smccc_res res = arm_smccc_smc(ARM_SMCCC_VERSION_FID);
 
-        arm_smccc_smc(ARM_SMCCC_VERSION_FID, &res);
         if ( PSCI_RET(res) != ARM_SMCCC_NOT_SUPPORTED )
             smccc_ver = PSCI_RET(res);
     }
@@ -191,7 +190,7 @@ static int __init psci_init_0_2(void)
         }
     }
 
-    arm_smccc_smc(PSCI_0_2_FN32_PSCI_VERSION, &res);
+    res = arm_smccc_smc(PSCI_0_2_FN32_PSCI_VERSION);
     psci_ver = PSCI_RET(res);
 
     /* For the moment, we only support PSCI 0.2 and PSCI 1.x */
diff --git a/xen/arch/arm/tee/optee.c b/xen/arch/arm/tee/optee.c
index 3d26332370..5e94daee06 100644
--- a/xen/arch/arm/tee/optee.c
+++ b/xen/arch/arm/tee/optee.c
@@ -178,7 +178,7 @@ static bool optee_probe(void)
         return false;
 
     /* Check UID */
-    arm_smccc_smc(ARM_SMCCC_CALL_UID_FID(TRUSTED_OS_END), &resp);
+    resp = arm_smccc_smc(ARM_SMCCC_CALL_UID_FID(TRUSTED_OS_END));
 
     if ( (uint32_t)resp.a0 != OPTEE_MSG_UID_0 ||
          (uint32_t)resp.a1 != OPTEE_MSG_UID_1 ||
@@ -187,7 +187,7 @@ static bool optee_probe(void)
         return false;
 
     /* Read number of threads */
-    arm_smccc_smc(OPTEE_SMC_GET_THREAD_COUNT, &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_GET_THREAD_COUNT);
     if ( resp.a0 == OPTEE_SMC_RETURN_OK )
     {
         max_optee_threads = resp.a1;
@@ -209,7 +209,7 @@ static bool optee_probe(void)
      * call. It will return OPTEE_SMC_RETURN_UNKNOWN_FUNCTION if
      * OP-TEE have no virtualization support enabled.
      */
-    arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, 0, 0, 0, 0, 0, 0, 0, &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, 0, 0, 0, 0, 0, 0, 0);
     if ( resp.a0 == OPTEE_SMC_RETURN_UNKNOWN_FUNCTION )
         return false;
 
@@ -243,8 +243,8 @@ static int optee_domain_init(struct domain *d)
      *
      * a7 should be 0, so we can't skip last 6 parameters of arm_smccc_smc()
      */
-    arm_smccc_smc(OPTEE_SMC_VM_CREATED, OPTEE_CLIENT_ID(d), 0, 0, 0, 0, 0, 0,
-                  &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_VM_CREATED, OPTEE_CLIENT_ID(d),
+                         0, 0, 0, 0, 0, 0);
     if ( resp.a0 != OPTEE_SMC_RETURN_OK )
     {
         printk(XENLOG_WARNING "%pd: Unable to create OPTEE client: rc = 0x%X\n",
@@ -681,8 +681,8 @@ static int optee_relinquish_resources(struct domain *d)
      *
      * a7 should be 0, so we can't skip last 6 parameters of arm_smccc_smc()
      */
-    arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, OPTEE_CLIENT_ID(d), 0, 0, 0, 0, 0, 0,
-                  &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, OPTEE_CLIENT_ID(d),
+                         0, 0, 0, 0, 0, 0);
 
     ASSERT(!spin_is_locked(&ctx->lock));
     ASSERT(!atomic_read(&ctx->call_count));
@@ -1171,15 +1171,15 @@ static void do_call_with_arg(struct optee_domain *ctx,
 {
     struct arm_smccc_res res;
 
-    arm_smccc_smc(a0, a1, a2, a3, a4, a5, 0, OPTEE_CLIENT_ID(current->domain),
-                  &res);
+    res = arm_smccc_smc(a0, a1, a2, a3, a4, a5, 0,
+                        OPTEE_CLIENT_ID(current->domain));
 
     if ( OPTEE_SMC_RETURN_IS_RPC(res.a0) )
     {
         while ( handle_rpc_return(ctx, &res, regs, call)  == -ERESTART )
         {
-            arm_smccc_smc(res.a0, res.a1, res.a2, res.a3, 0, 0, 0,
-                          OPTEE_CLIENT_ID(current->domain), &res);
+            res = arm_smccc_smc(res.a0, res.a1, res.a2, res.a3, 0, 0, 0,
+                                OPTEE_CLIENT_ID(current->domain));
 
             if ( !OPTEE_SMC_RETURN_IS_RPC(res.a0) )
                 break;
@@ -1619,8 +1619,8 @@ static void handle_exchange_capabilities(struct cpu_user_regs *regs)
     caps = get_user_reg(regs, 1);
     caps &= OPTEE_KNOWN_NSEC_CAPS;
 
-    arm_smccc_smc(OPTEE_SMC_EXCHANGE_CAPABILITIES, caps, 0, 0, 0, 0, 0,
-                  OPTEE_CLIENT_ID(current->domain), &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_EXCHANGE_CAPABILITIES, caps, 0, 0, 0, 0, 0,
+                         OPTEE_CLIENT_ID(current->domain));
     if ( resp.a0 != OPTEE_SMC_RETURN_OK ) {
         set_user_reg(regs, 0, resp.a0);
         return;
@@ -1664,8 +1664,8 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_CALLS_UID:
-        arm_smccc_smc(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         set_user_reg(regs, 2, resp.a2);
@@ -1673,15 +1673,15 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_CALLS_REVISION:
-        arm_smccc_smc(OPTEE_SMC_CALLS_REVISION, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALLS_REVISION, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         return true;
 
     case OPTEE_SMC_CALL_GET_OS_UUID:
-        arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_UUID, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain),&resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_UUID, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         set_user_reg(regs, 2, resp.a2);
@@ -1689,21 +1689,21 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_CALL_GET_OS_REVISION:
-        arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         return true;
 
     case OPTEE_SMC_ENABLE_SHM_CACHE:
-        arm_smccc_smc(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         return true;
 
     case OPTEE_SMC_DISABLE_SHM_CACHE:
-        arm_smccc_smc(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         if ( resp.a0 == OPTEE_SMC_RETURN_OK ) {
             free_shm_rpc(ctx,  regpair_to_uint64(resp.a1, resp.a2));
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 625d229396..6a5dcef2aa 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1991,7 +1991,7 @@ void asmlinkage enter_hypervisor_from_guest_preirq(void)
 
     /* If the guest has disabled the workaround, bring it back on. */
     if ( needs_ssbd_flip(v) )
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1);
 }
 
 /*
@@ -2334,7 +2334,7 @@ void asmlinkage leave_hypervisor_to_guest(void)
      * If the guest wants it disabled, so be it...
      */
     if ( needs_ssbd_flip(current) )
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0);
 }
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 12:22:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 12:22:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410823.1641629 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMM-0005AP-KM; Mon, 07 Sep 2026 12:22:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410823.1641629; Mon, 07 Sep 2026 12:22:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMM-0005AG-HZ; Mon, 07 Sep 2026 12:22:02 +0000
Received: by outflank-mailman (input) for mailman id 1410823;
 Mon, 07 Sep 2026 12:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3YMM-0005A9-29
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 12:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YML-003Beo-1z
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YML-0041QB-2w
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=En7YEt4pKH92Irv/eJU2zh14B0eogOhHOeNr9AvglJc=; b=nXSmiBCQPwDnSo4wbuQG5GafPi
	VDeCPthRFn5XNawhx/sHobdMWbTDgZKp3lUK2atWLysmFees9ytSAr6g/NyGuQKfUkLVa299XBktU
	1KEw4FkB9S0sFa7PrT3yG8w2tFPALD4E0kXs75MyT595ARCmw/9OjCrckgJK2iiQgsSc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Fix evaluation of parameters for SMCCC calls
Message-Id: <E1x3YML-0041QB-2w@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 12:22:01 +0000

commit 95302b39430c9d2d4b50c2c63f56629e543b29e6
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:35 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Fix evaluation of parameters for SMCCC calls
    
    Contrary to what was claimed in commit 67bcf5eae709 ("xen/arm: Simplify type
    handling for SMCCC declarations"), there is an important reason to retain the
    intermediate variable.  It is unsafe to have any logic between the assignment
    of the register variables and the asm() block they're used in.
    
    This logically reverts commit 67bcf5eae709 ("xen/arm: Simplify type handling
    for SMCCC declarations") while retaining the conversions from commit
    7f15d5d13221 ("xen/treewide: More typeof() -> auto conversions").
    
    Adjust __declare_arg_0() to match.  It happens to be safe because it's the
    first register expression once all macros are expanded, but it really should
    be consistent with the others.
    
    Leave a comment explaining why they must be written like this.
    
    Fixes: 67bcf5eae709 ("xen/arm: Simplify type handling for SMCCC declarations")
    Reported-by: Jan Setje-Eilers <Jan.SetjeEilers@oracle.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/include/asm/smccc.h | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 62c6985e73..53cdddb690 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -108,37 +108,52 @@ struct arm_smccc_res {
 #define __constraint_read_6 __constraint_read_5, "r" (arg6)
 #define __constraint_read_7 __constraint_read_6, "r" (arg7)
 
+/*
+ * Macro arguments MUST be evaluated before being assigned to a register
+ * variable.
+ *
+ * This is manual register scheduling for the asm() statement, and any other
+ * logic to evaluate may clobber the already-scheduled registers.
+ */
 #define __declare_arg_0(a0, res)                            \
+    auto __a0 = (uint32_t)(a0);                             \
     struct arm_smccc_res    *___res = (res);                \
-    register unsigned long  arg0 ASM_REG(0) = (uint32_t)(a0)
+    register unsigned long  arg0 ASM_REG(0) = __a0
 
 #define __declare_arg_1(a0, a1, res)                        \
+    auto __a1 = (a1);                                       \
     __declare_arg_0(a0, res);                               \
-    register auto           arg1 ASM_REG(1) = (a1)
+    register auto           arg1 ASM_REG(1) = __a1
 
 #define __declare_arg_2(a0, a1, a2, res)                    \
+    auto __a2 = (a2);                                       \
     __declare_arg_1(a0, a1, res);                           \
-    register auto           arg2 ASM_REG(2) = (a2)
+    register auto           arg2 ASM_REG(2) = __a2
 
 #define __declare_arg_3(a0, a1, a2, a3, res)                \
+    auto __a3 = (a3);                                       \
     __declare_arg_2(a0, a1, a2, res);                       \
-    register auto           arg3 ASM_REG(3) = (a3)
+    register auto           arg3 ASM_REG(3) = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
+    auto __a4 = (a4);                                   \
     __declare_arg_3(a0, a1, a2, a3, res);               \
-    register auto           arg4 ASM_REG(4) = (a4)
+    register auto           arg4 ASM_REG(4) = __a4
 
 #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)    \
+    auto __a5 = (a5);                                   \
     __declare_arg_4(a0, a1, a2, a3, a4, res);           \
-    register auto           arg5 ASM_REG(5) = (a5)
+    register auto           arg5 ASM_REG(5) = __a5
 
 #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)    \
+    auto __a6 = (a6);                                       \
     __declare_arg_5(a0, a1, a2, a3, a4, a5, res);           \
-    register auto           arg6 ASM_REG(6) = (a6)
+    register auto           arg6 ASM_REG(6) = __a6
 
 #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)    \
+    auto __a7 = (a7);                                           \
     __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);           \
-    register auto           arg7 ASM_REG(7) = (a7)
+    register auto           arg7 ASM_REG(7) = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 12:22:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 12:22:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410824.1641633 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMW-0005C6-Le; Mon, 07 Sep 2026 12:22:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410824.1641633; Mon, 07 Sep 2026 12:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMW-0005Bx-Iw; Mon, 07 Sep 2026 12:22:12 +0000
Received: by outflank-mailman (input) for mailman id 1410824;
 Mon, 07 Sep 2026 12:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3YMW-0005Br-1s
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 12:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMV-003Bev-2G
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMV-0042Nq-3D
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2fxBJ1T+dlTNB2ADNnY04wbOqYQTCVLqazdWjVvx3qs=; b=myuNVXpyDrtNLU9aMwOALkzGrG
	ycTPeW0Rm9tNS0mUd+KvgNvhbJsFa5veH+BCstnDdNn7vuZirIAoT1+INuRBVJAyQ0CMp1PvLUx8D
	MjE7l7rch08YckvBTRloQyDrpM+6TnlYqWBbv99cZhyHWyCEJ1nPtKvBeRySNDmxgmAY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Introduce arm_smccc_guest_smc()
Message-Id: <E1x3YMV-0042Nq-3D@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 12:22:11 +0000

commit b128b74cf85e3336b8262a0e92f8b6d651e3da5b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:40 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Introduce arm_smccc_guest_smc()
    
    Both {get,set}_user_reg() are out-of-line functions, leading to awful code
    generation.
    
    Introduce arm_smccc_guest_smc() to operate directly on guest registers.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/firmware/scmi-smc.c            | 16 +---------------
 xen/arch/arm/include/asm/smccc.h            | 29 +++++++++++++++++++++++++++++
 xen/arch/arm/platforms/imx8m.c              | 16 +---------------
 xen/arch/arm/platforms/imx8qm.c             | 16 +---------------
 xen/arch/arm/platforms/xilinx-zynqmp-eemi.c | 17 ++---------------
 5 files changed, 34 insertions(+), 60 deletions(-)

diff --git a/xen/arch/arm/firmware/scmi-smc.c b/xen/arch/arm/firmware/scmi-smc.c
index 0835ddeeec..a0cc6c6192 100644
--- a/xen/arch/arm/firmware/scmi-smc.c
+++ b/xen/arch/arm/firmware/scmi-smc.c
@@ -50,7 +50,6 @@ static bool scmi_is_valid_smc_id(uint32_t fid)
 static bool scmi_handle_smc(struct cpu_user_regs *regs)
 {
     uint32_t fid = (uint32_t)get_user_reg(regs, 0);
-    struct arm_smccc_res res;
 
     if ( !scmi_is_valid_smc_id(fid) )
         return false;
@@ -63,20 +62,7 @@ static bool scmi_handle_smc(struct cpu_user_regs *regs)
     }
 
     /* For the moment, forward the SCMI Request to FW running at EL3 */
-    arm_smccc_1_1_smc(fid,
-                      get_user_reg(regs, 1),
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
 
     return true;
 }
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 53cdddb690..832157f437 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -202,6 +202,21 @@ struct arm_smccc_res {
 #ifdef CONFIG_ARM_32
 #define arm_smccc_1_0_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 #define arm_smccc_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
+
+/* Make an SMCCC v1.1 compliant SMC call with guest register state. */
+static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
+{
+    struct arm_smccc_res res;
+
+    arm_smccc_1_1_smc(regs->r0, regs->r1, regs->r2, regs->r3,
+                      regs->r4, regs->r5, regs->r6, regs->r7, &res);
+
+    regs->r0 = res.a0;
+    regs->r1 = res.a1;
+    regs->r2 = res.a2;
+    regs->r3 = res.a3;
+}
+
 #else
 
 void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
@@ -251,6 +266,20 @@ void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
             arm_smccc_1_0_smc(__VA_ARGS__);                     \
     } while ( 0 )
 
+/* Make an SMCCC v1.1 compliant SMC call with guest register state. */
+static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
+{
+    struct arm_smccc_res res;
+
+    arm_smccc_1_1_smc(regs->x0, regs->x1, regs->x2, regs->x3,
+                      regs->x4, regs->x5, regs->x6, regs->x7, &res);
+
+    regs->x0 = res.a0;
+    regs->x1 = res.a1;
+    regs->x2 = res.a2;
+    regs->x3 = res.a3;
+}
+
 /*
  * struct arm_smccc_1_2_regs - Arguments for or Results from SMC call
  * @a0-a17 argument values from registers 0 to 17
diff --git a/xen/arch/arm/platforms/imx8m.c b/xen/arch/arm/platforms/imx8m.c
index 669dd517e0..efb0ad20d6 100644
--- a/xen/arch/arm/platforms/imx8m.c
+++ b/xen/arch/arm/platforms/imx8m.c
@@ -50,7 +50,6 @@ static bool imx8m_smc(struct cpu_user_regs *regs)
 {
     uint32_t function_id = get_user_reg(regs, 0);
     uint32_t subfunction_id = get_user_reg(regs, 1);
-    struct arm_smccc_res res;
 
     if ( !cpus_have_const_cap(ARM_SMCCC_1_1) )
     {
@@ -122,20 +121,7 @@ static bool imx8m_smc(struct cpu_user_regs *regs)
         return false;
     }
 
-    arm_smccc_1_1_smc(function_id,
-                      subfunction_id,
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
 
     return true;
 }
diff --git a/xen/arch/arm/platforms/imx8qm.c b/xen/arch/arm/platforms/imx8qm.c
index 3600a073e8..7249e14ab6 100644
--- a/xen/arch/arm/platforms/imx8qm.c
+++ b/xen/arch/arm/platforms/imx8qm.c
@@ -67,7 +67,6 @@ static bool imx8qm_smc(struct cpu_user_regs *regs)
 {
     uint32_t function_id = get_user_reg(regs, 0);
     uint32_t subfunction_id = get_user_reg(regs, 1);
-    struct arm_smccc_res res;
 
     if ( !cpus_have_const_cap(ARM_SMCCC_1_1) )
     {
@@ -106,20 +105,7 @@ static bool imx8qm_smc(struct cpu_user_regs *regs)
     }
 
  allow_call:
-    arm_smccc_1_1_smc(function_id,
-                      subfunction_id,
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
 
     return true;
 }
diff --git a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
index 2053ed7ac5..326c8a1ba6 100644
--- a/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
+++ b/xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
@@ -51,7 +51,6 @@ static inline bool domain_has_reset_access(struct domain *d, uint32_t rst)
 
 bool zynqmp_eemi(struct cpu_user_regs *regs)
 {
-    struct arm_smccc_res res;
     uint32_t fid = get_user_reg(regs, 0);
     uint32_t nodeid = get_user_reg(regs, 1);
     unsigned int pm_fn = fid & 0xFFFF;
@@ -187,20 +186,8 @@ forward_to_fw:
      * can forward the whole command to firmware without additional
      * parameters checks.
      */
-    arm_smccc_1_1_smc(get_user_reg(regs, 0),
-                      get_user_reg(regs, 1),
-                      get_user_reg(regs, 2),
-                      get_user_reg(regs, 3),
-                      get_user_reg(regs, 4),
-                      get_user_reg(regs, 5),
-                      get_user_reg(regs, 6),
-                      get_user_reg(regs, 7),
-                      &res);
-
-    set_user_reg(regs, 0, res.a0);
-    set_user_reg(regs, 1, res.a1);
-    set_user_reg(regs, 2, res.a2);
-    set_user_reg(regs, 3, res.a3);
+    arm_smccc_guest_smc(regs);
+
     return true;
 
 done:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 12:22:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 12:22:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410825.1641637 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMg-0005FA-My; Mon, 07 Sep 2026 12:22:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410825.1641637; Mon, 07 Sep 2026 12:22:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMg-0005F2-KJ; Mon, 07 Sep 2026 12:22:22 +0000
Received: by outflank-mailman (input) for mailman id 1410825;
 Mon, 07 Sep 2026 12:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3YMg-0005Ew-4y
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 12:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMf-003Bez-2Y
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMg-0043Iz-0G
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nLTMxUiVU7RbQI9iU+YGuFwBkLOS2zuciro8kfhDVEc=; b=gop7QAnVyTMz3ABfixwh34lCYR
	5Ek5NlpOKDy3DKVglonw8A7atubwMIDhXTpTH6izRzr+eR5FoJ0LWogLYa+KX2D0Vx1eKu01ZKvvl
	rZsGMgA1iZTpeGlIUFgaEfLvvpPxfzjv0P3sfO7g3ysKHoAgVjHc3S0Gn8fDQSEsPdbk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Clean up 32bit arm_smccc_1_1_smc()
Message-Id: <E1x3YMg-0043Iz-0G@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 12:22:22 +0000

commit 979251a377012c5afb2b7db25455ebd2a4b9b724
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:37 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Clean up 32bit arm_smccc_1_1_smc()
    
    ... before making a related copy of it.
    
     * Drop __constraints() so the output parameters are visible in the same block
       as they're defined.  Use PASTE() rather than opencoding it.
     * Adjust the indentation of trailing \'s for consistency.
     * Drop the newline at the end of the instruction.
     * Indent the if condition correctly.  ___res is always of type
       arm_smccc_res (declared in __declare_arg_0()), so drop the typeof().
     * Drop arm_smccc_1_0_smc() as it has no users.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/include/asm/smccc.h | 45 ++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 832157f437..5fe54013ac 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -56,6 +56,8 @@
 
 #ifndef __ASSEMBLER__
 
+#include <xen/macros.h>
+
 extern uint32_t smccc_ver;
 
 /* Check if this is fast call. */
@@ -115,24 +117,24 @@ struct arm_smccc_res {
  * This is manual register scheduling for the asm() statement, and any other
  * logic to evaluate may clobber the already-scheduled registers.
  */
-#define __declare_arg_0(a0, res)                            \
-    auto __a0 = (uint32_t)(a0);                             \
-    struct arm_smccc_res    *___res = (res);                \
+#define __declare_arg_0(a0, res)                        \
+    auto __a0 = (uint32_t)(a0);                         \
+    struct arm_smccc_res    *___res = (res);            \
     register unsigned long  arg0 ASM_REG(0) = __a0
 
-#define __declare_arg_1(a0, a1, res)                        \
-    auto __a1 = (a1);                                       \
-    __declare_arg_0(a0, res);                               \
+#define __declare_arg_1(a0, a1, res)                    \
+    auto __a1 = (a1);                                   \
+    __declare_arg_0(a0, res);                           \
     register auto           arg1 ASM_REG(1) = __a1
 
-#define __declare_arg_2(a0, a1, a2, res)                    \
-    auto __a2 = (a2);                                       \
-    __declare_arg_1(a0, a1, res);                           \
+#define __declare_arg_2(a0, a1, a2, res)                \
+    auto __a2 = (a2);                                   \
+    __declare_arg_1(a0, a1, res);                       \
     register auto           arg2 ASM_REG(2) = __a2
 
-#define __declare_arg_3(a0, a1, a2, a3, res)                \
-    auto __a3 = (a3);                                       \
-    __declare_arg_2(a0, a1, a2, res);                       \
+#define __declare_arg_3(a0, a1, a2, a3, res)            \
+    auto __a3 = (a3);                                   \
+    __declare_arg_2(a0, a1, a2, res);                   \
     register auto           arg3 ASM_REG(3) = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
@@ -158,12 +160,6 @@ struct arm_smccc_res {
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
 
-#define ___constraints(count)                       \
-    : "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)     \
-    : __constraint_read_ ## count                   \
-    : "memory"
-#define __constraints(count)    ___constraints(count)
-
 /*
  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
  *
@@ -189,10 +185,14 @@ struct arm_smccc_res {
         register unsigned long r2 ASM_REG(2);                   \
         register unsigned long r3 ASM_REG(3);                   \
         __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
-        asm volatile("smc #0\n"                                 \
-                     __constraints(__count_args(__VA_ARGS__))); \
+        asm volatile (                                          \
+            "smc #0"                                            \
+            : "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)        \
+            : PASTE(__constraint_read_,                         \
+                    __count_args(__VA_ARGS__))                  \
+            : "memory" );                                       \
         if ( ___res )                                           \
-        *___res = (typeof(*___res)){r0, r1, r2, r3};            \
+            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
     } while ( 0 )
 
 /*
@@ -200,7 +200,6 @@ struct arm_smccc_res {
  * v1.1.
  */
 #ifdef CONFIG_ARM_32
-#define arm_smccc_1_0_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 #define arm_smccc_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 
 /* Make an SMCCC v1.1 compliant SMC call with guest register state. */
@@ -217,7 +216,7 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
     regs->r3 = res.a3;
 }
 
-#else
+#else /* CONFIG_ARM_64 */
 
 void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
                          register_t a3, register_t a4, register_t a5,
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 12:22:32 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 12:22:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410826.1641641 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMq-0005IA-Oa; Mon, 07 Sep 2026 12:22:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410826.1641641; Mon, 07 Sep 2026 12:22:32 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YMq-0005I3-Lo; Mon, 07 Sep 2026 12:22:32 +0000
Received: by outflank-mailman (input) for mailman id 1410826;
 Mon, 07 Sep 2026 12:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3YMq-0005Hx-7o
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 12:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMp-003Bf3-2r
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMq-00444O-0Z
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zD7sXGKWujmYuOZo9N0Xo0DO/h+gETSodd/iBGf41ho=; b=3ZXm6RcEimwLds6kSEANkd/EOC
	FZQ+hM/8j++5l2XZS2h5QbWpL3KHVTnT4i6aetv5SML9VAA0c2iY4qblfne96ikILBqOembOIBBHw
	DVT4vMEx+nOO1NVjl3gSmib+hSR13bzAeuFT8nAbrrsyxCf5mJXrqa7UFoJfvGwlHGKM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Rewrite arm_smccc_smc() for arm64
Message-Id: <E1x3YMq-00444O-0Z@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 12:22:32 +0000

commit 1b5ff89cc33df0fa58af0fc22d62f6ec8475e7c3
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:38 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Rewrite arm_smccc_smc() for arm64
    
    SMCCC v1.0 says that x4 through x17 may be clobbered.  SMCCC v1.1 says they
    are strictly preserved, and SMCCC v1.2 permits them to contain extra return
    values.
    
    Xen deals with this by having __arm_smccc_1_0_smc() as an out-of-line
    function, but this causes awful code generation in arm_smccc_smc().
    cpus_have_const_cap() is opaque to the optimiser, so we end up with one basic
    block doing the reasonably-ok arm_smccc_1_1_smc() code generation and a second
    basic block setting up all 8 input registers even when they're not needed,
    spilling or discarding x8 through x17, and calling an out-of-line function.
    
    Remove __arm_smccc_1_0_smc() entirely, and rewrite arm_smccc_smc() to declare
    x4 through x17 as clobbered.
    
    This fully inlines the SMC, is a single basic block which instructs the
    compiler to spill or discard the potentially clobbered registers, and only
    sets up the necessary number of arguments for the call.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/arm64/smc.S         | 16 -------
 xen/arch/arm/include/asm/smccc.h | 92 ++++++++++++++++++++--------------------
 2 files changed, 45 insertions(+), 63 deletions(-)

diff --git a/xen/arch/arm/arm64/smc.S b/xen/arch/arm/arm64/smc.S
index 68b05e8ddd..65b4eabe4f 100644
--- a/xen/arch/arm/arm64/smc.S
+++ b/xen/arch/arm/arm64/smc.S
@@ -13,22 +13,6 @@
  * GNU General Public License for more details.
  */
 
-/*
- * void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
- *                          register_t a3, register_t a4, register_t a5,
- *                          register_t a6, register_t a7,
- *                          struct arm_smccc_res *res)
- */
-FUNC(__arm_smccc_1_0_smc)
-        smc     #0
-        ldr     x4, [sp]
-        cbz     x4, 1f          /* No need to store the result */
-        stp     x0, x1, [x4, #SMCCC_RES_a0]
-        stp     x2, x3, [x4, #SMCCC_RES_a2]
-1:
-        ret
-END(__arm_smccc_1_0_smc)
-
 /*
  * void arm_smccc_1_2_smc(const struct arm_smccc_1_2_regs *args,
  *                        struct arm_smccc_1_2_regs *res)
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 5fe54013ac..4ed2a40ed0 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -16,9 +16,6 @@
 #ifndef __ASM_ARM_SMCCC_H__
 #define __ASM_ARM_SMCCC_H__
 
-#include <asm/alternative.h>
-#include <asm/cpufeature.h>
-
 #define SMCCC_VERSION_MAJOR_SHIFT            16
 #define SMCCC_VERSION_MINOR_MASK             \
         ((1U << SMCCC_VERSION_MAJOR_SHIFT) - 1)
@@ -57,6 +54,9 @@
 #ifndef __ASSEMBLER__
 
 #include <xen/macros.h>
+#include <xen/types.h>
+
+#include <asm/asm_defns.h>
 
 extern uint32_t smccc_ver;
 
@@ -160,6 +160,8 @@ struct arm_smccc_res {
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
 
+#ifdef CONFIG_ARM_32
+
 /*
  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
  *
@@ -199,7 +201,6 @@ struct arm_smccc_res {
  * The calling convention for arm32 is the same for both SMCCC v1.0 and
  * v1.1.
  */
-#ifdef CONFIG_ARM_32
 #define arm_smccc_smc(...) arm_smccc_1_1_smc(__VA_ARGS__)
 
 /* Make an SMCCC v1.1 compliant SMC call with guest register state. */
@@ -218,53 +219,50 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 
 #else /* CONFIG_ARM_64 */
 
-void __arm_smccc_1_0_smc(register_t a0, register_t a1, register_t a2,
-                         register_t a3, register_t a4, register_t a5,
-                         register_t a6, register_t a7,
-                         struct arm_smccc_res *res);
-
-/* Macros to handle variadic parameter for SMCCC v1.0 helper */
-#define __arm_smccc_1_0_smc_7(a0, a1, a2, a3, a4, a5, a6, a7, res)  \
-    __arm_smccc_1_0_smc(a0, a1, a2, a3, a4, a5, a6, a7, res)
-
-#define __arm_smccc_1_0_smc_6(a0, a1, a2, a3, a4, a5, a6, res)  \
-    __arm_smccc_1_0_smc_7(a0, a1, a2, a3, a4, a5, a6, 0, res)
-
-#define __arm_smccc_1_0_smc_5(a0, a1, a2, a3, a4, a5, res)  \
-    __arm_smccc_1_0_smc_6(a0, a1, a2, a3, a4, a5, 0, res)
-
-#define __arm_smccc_1_0_smc_4(a0, a1, a2, a3, a4, res)  \
-    __arm_smccc_1_0_smc_5(a0, a1, a2, a3, a4, 0, res)
-
-#define __arm_smccc_1_0_smc_3(a0, a1, a2, a3, res)  \
-    __arm_smccc_1_0_smc_4(a0, a1, a2, a3, 0, res)
-
-#define __arm_smccc_1_0_smc_2(a0, a1, a2, res)  \
-    __arm_smccc_1_0_smc_3(a0, a1, a2, 0, res)
-
-#define __arm_smccc_1_0_smc_1(a0, a1, res)  \
-    __arm_smccc_1_0_smc_2(a0, a1, 0, res)
-
-#define __arm_smccc_1_0_smc_0(a0, res)  \
-    __arm_smccc_1_0_smc_1(a0, 0, res)
-
-#define ___arm_smccc_1_0_smc_count(count, ...)    \
-    __arm_smccc_1_0_smc_ ## count(__VA_ARGS__)
-
-#define __arm_smccc_1_0_smc_count(count, ...)   \
-    ___arm_smccc_1_0_smc_count(count, __VA_ARGS__)
-
-#define arm_smccc_1_0_smc(...)                                              \
-        __arm_smccc_1_0_smc_count(__count_args(__VA_ARGS__), __VA_ARGS__)
-
+/*
+ * Make an SMC call compatible with both SMCCC v1.1 and v1.0.
+ *
+ * SMCCC v1.0 says that x4 through x17 are clobbered.  SMCCC v1.1 says they
+ * are strictly preserved.  Always mark x4 through x17 as clobbered.
+ */
 #define arm_smccc_smc(...)                                      \
     do {                                                        \
-        if ( cpus_have_const_cap(ARM_SMCCC_1_1) )               \
-            arm_smccc_1_1_smc(__VA_ARGS__);                     \
-        else                                                    \
-            arm_smccc_1_0_smc(__VA_ARGS__);                     \
+        register unsigned long r0  ASM_REG(0);                  \
+        register unsigned long r1  ASM_REG(1);                  \
+        register unsigned long r2  ASM_REG(2);                  \
+        register unsigned long r3  ASM_REG(3);                  \
+        /* Potentially clobbered in SMCCC v1.0 */               \
+        register unsigned long c4  ASM_REG(4);                  \
+        register unsigned long c5  ASM_REG(5);                  \
+        register unsigned long c6  ASM_REG(6);                  \
+        register unsigned long c7  ASM_REG(7);                  \
+        register unsigned long c8  ASM_REG(8);                  \
+        register unsigned long c9  ASM_REG(9);                  \
+        register unsigned long c10 ASM_REG(10);                 \
+        register unsigned long c11 ASM_REG(11);                 \
+        register unsigned long c12 ASM_REG(12);                 \
+        register unsigned long c13 ASM_REG(13);                 \
+        register unsigned long c14 ASM_REG(14);                 \
+        register unsigned long c15 ASM_REG(15);                 \
+        register unsigned long c16 ASM_REG(16);                 \
+        register unsigned long c17 ASM_REG(17);                 \
+        __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+        asm volatile (                                          \
+            "smc #0"                                            \
+            : "=r" (r0),  "=r" (r1),  "=r" (r2),  "=r" (r3),    \
+              "=r" (c4),  "=r" (c5),  "=r" (c6),  "=r" (c7),    \
+              "=r" (c8),  "=r" (c9),  "=r" (c10), "=r" (c11),   \
+              "=r" (c12), "=r" (c13), "=r" (c14), "=r" (c15),   \
+              "=r" (c16), "=r" (c17)                            \
+            : PASTE(__constraint_read_,                         \
+                    __count_args(__VA_ARGS__))                  \
+            : "memory" );                                       \
+        if ( ___res )                                           \
+            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
     } while ( 0 )
 
+#define arm_smccc_1_1_smc(...) arm_smccc_smc(__VA_ARGS__)
+
 /* Make an SMCCC v1.1 compliant SMC call with guest register state. */
 static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 12:22:42 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 12:22:42 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410827.1641645 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YN0-0005Kd-RP; Mon, 07 Sep 2026 12:22:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410827.1641645; Mon, 07 Sep 2026 12:22:42 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3YN0-0005KW-Ok; Mon, 07 Sep 2026 12:22:42 +0000
Received: by outflank-mailman (input) for mailman id 1410827;
 Mon, 07 Sep 2026 12:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3YN0-0005KQ-BO
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 12:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YMz-003Bf7-3C
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3YN0-0044ll-0v
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 12:22:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=7u4h/jn3u4j5SarafreHoz1GPKZG69FYpvnnMV/NwSk=; b=OP755eJQyJbkurhiZLUzmO7g7W
	uVjGGaWIuQjjdv2X13YA2pBNDMOCabQ7clyOCTFRwvsCDdM6zNbpQMK0SOM9hPB7A2o51Iw7dM00P
	OhtZiSF7TQZlhjQNulRgBPnUfqdkcLEV0mzyCKgGFThSNkAI9xqOuwtRFGKg00Khx+Ro=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Rewrite arm_smccc_*() to return by value
Message-Id: <E1x3YN0-0044ll-0v@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 12:22:42 +0000

commit 715f2c3c25698f16ff0ee3ee0e8f329e4b51c539
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:47 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Sep 7 11:18:11 2026 +0100

    xen/arm: Rewrite arm_smccc_*() to return by value
    
    Use statement expressions to return struct arm_smccc_res which makes the code
    read a lot more normally, and avoids needing to pass in NULL in order to skip
    return information.
    
    More importantly, it removes the local implementation of __count_args() which
    is off by two and deeply confusing to try and follow.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/cpuerrata.c         | 18 ++++----
 xen/arch/arm/include/asm/smccc.h | 92 ++++++++++++++++++----------------------
 xen/arch/arm/platforms/exynos5.c |  2 +-
 xen/arch/arm/platforms/seattle.c |  4 +-
 xen/arch/arm/psci.c              | 17 ++++----
 xen/arch/arm/tee/optee.c         | 50 +++++++++++-----------
 xen/arch/arm/traps.c             |  4 +-
 7 files changed, 88 insertions(+), 99 deletions(-)

diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 3a32183618..35ad98d29d 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -179,8 +179,8 @@ static int enable_smccc_arch_workaround_1(void *data)
     if ( smccc_ver < SMCCC_VERSION(1, 1) )
         goto warn;
 
-    arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
-                      ARM_SMCCC_ARCH_WORKAROUND_1_FID, &res);
+    res = arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
+                            ARM_SMCCC_ARCH_WORKAROUND_1_FID);
     /* The return value is in the lower 32-bits. */
     if ( (int)res.a0 < 0 )
         goto warn;
@@ -256,8 +256,8 @@ static int enable_spectre_bhb_workaround(void *data)
         if ( smccc_ver < SMCCC_VERSION(1, 1) )
             goto warn;
 
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
-                          ARM_SMCCC_ARCH_WORKAROUND_3_FID, &res);
+        res = arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
+                                ARM_SMCCC_ARCH_WORKAROUND_3_FID);
         /* The return value is in the lower 32-bits. */
         if ( (int)res.a0 < 0 )
         {
@@ -398,8 +398,8 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
     if ( smccc_ver < SMCCC_VERSION(1, 1) )
         return false;
 
-    arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
-                      ARM_SMCCC_ARCH_WORKAROUND_2_FID, &res);
+    res = arm_smccc_1_1_smc(ARM_SMCCC_ARCH_FEATURES_FID,
+                            ARM_SMCCC_ARCH_WORKAROUND_2_FID);
 
     switch ( (int)res.a0 )
     {
@@ -429,7 +429,7 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
     case ARM_SSBD_FORCE_DISABLE:
         printk_once("%s disabled from command-line\n", entry->desc);
 
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0);
         required = false;
         break;
 
@@ -437,7 +437,7 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
         if ( required )
         {
             this_cpu(ssbd_callback_required) = 1;
-            arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL);
+            arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1);
         }
 
         break;
@@ -445,7 +445,7 @@ static bool has_ssbd_mitigation(const struct arm_cpu_capabilities *entry)
     case ARM_SSBD_FORCE_ENABLE:
         printk_once("%s forced from command-line\n", entry->desc);
 
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1);
         required = true;
         break;
 
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 4ed2a40ed0..c7763acd7f 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -95,20 +95,14 @@ struct arm_smccc_res {
     unsigned long a3;
 };
 
-/* SMCCC v1.1 implementation madness follows */
-#define ___count_args(_0, _1, _2, _3, _4, _5, _6, _7, _8, x, ...) x
-
-#define __count_args(...)                               \
-    ___count_args(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1, 0)
-
-#define __constraint_read_0 "r" (arg0)
-#define __constraint_read_1 __constraint_read_0, "r" (arg1)
-#define __constraint_read_2 __constraint_read_1, "r" (arg2)
-#define __constraint_read_3 __constraint_read_2, "r" (arg3)
-#define __constraint_read_4 __constraint_read_3, "r" (arg4)
-#define __constraint_read_5 __constraint_read_4, "r" (arg5)
-#define __constraint_read_6 __constraint_read_5, "r" (arg6)
-#define __constraint_read_7 __constraint_read_6, "r" (arg7)
+#define __constraint_read_1 "r" (arg0)
+#define __constraint_read_2 __constraint_read_1, "r" (arg1)
+#define __constraint_read_3 __constraint_read_2, "r" (arg2)
+#define __constraint_read_4 __constraint_read_3, "r" (arg3)
+#define __constraint_read_5 __constraint_read_4, "r" (arg4)
+#define __constraint_read_6 __constraint_read_5, "r" (arg5)
+#define __constraint_read_7 __constraint_read_6, "r" (arg6)
+#define __constraint_read_8 __constraint_read_7, "r" (arg7)
 
 /*
  * Macro arguments MUST be evaluated before being assigned to a register
@@ -117,44 +111,43 @@ struct arm_smccc_res {
  * This is manual register scheduling for the asm() statement, and any other
  * logic to evaluate may clobber the already-scheduled registers.
  */
-#define __declare_arg_0(a0, res)                        \
+#define __declare_arg_1(a0)                             \
     auto __a0 = (uint32_t)(a0);                         \
-    struct arm_smccc_res    *___res = (res);            \
     register unsigned long  arg0 ASM_REG(0) = __a0
 
-#define __declare_arg_1(a0, a1, res)                    \
+#define __declare_arg_2(a0, a1)                         \
     auto __a1 = (a1);                                   \
-    __declare_arg_0(a0, res);                           \
+    __declare_arg_1(a0);                                \
     register auto           arg1 ASM_REG(1) = __a1
 
-#define __declare_arg_2(a0, a1, a2, res)                \
+#define __declare_arg_3(a0, a1, a2)                     \
     auto __a2 = (a2);                                   \
-    __declare_arg_1(a0, a1, res);                       \
+    __declare_arg_2(a0, a1);                            \
     register auto           arg2 ASM_REG(2) = __a2
 
-#define __declare_arg_3(a0, a1, a2, a3, res)            \
+#define __declare_arg_4(a0, a1, a2, a3)                 \
     auto __a3 = (a3);                                   \
-    __declare_arg_2(a0, a1, a2, res);                   \
+    __declare_arg_3(a0, a1, a2);                        \
     register auto           arg3 ASM_REG(3) = __a3
 
-#define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
+#define __declare_arg_5(a0, a1, a2, a3, a4)             \
     auto __a4 = (a4);                                   \
-    __declare_arg_3(a0, a1, a2, a3, res);               \
+    __declare_arg_4(a0, a1, a2, a3);                    \
     register auto           arg4 ASM_REG(4) = __a4
 
-#define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)    \
+#define __declare_arg_6(a0, a1, a2, a3, a4, a5)         \
     auto __a5 = (a5);                                   \
-    __declare_arg_4(a0, a1, a2, a3, a4, res);           \
+    __declare_arg_5(a0, a1, a2, a3, a4);                \
     register auto           arg5 ASM_REG(5) = __a5
 
-#define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)    \
-    auto __a6 = (a6);                                       \
-    __declare_arg_5(a0, a1, a2, a3, a4, a5, res);           \
+#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6)     \
+    auto __a6 = (a6);                                   \
+    __declare_arg_6(a0, a1, a2, a3, a4, a5);            \
     register auto           arg6 ASM_REG(6) = __a6
 
-#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)    \
-    auto __a7 = (a7);                                           \
-    __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);           \
+#define __declare_arg_8(a0, a1, a2, a3, a4, a5, a6, a7) \
+    auto __a7 = (a7);                                   \
+    __declare_arg_7(a0, a1, a2, a3, a4, a5, a6);        \
     register auto           arg7 ASM_REG(7) = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
@@ -166,36 +159,34 @@ struct arm_smccc_res {
  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
  *
  * This is a variadic macro taking one to eight source arguments, and
- * an optional return structure.
+ * returns four values.
  *
  * @a0-a7: arguments passed in registers 0 to 7
  * @res: result values from registers 0 to 3
  *
  * This macro is used to make SMC calls following SMC Calling Convention v1.1.
  * The content of the supplied param are copied to registers 0 to 7 prior
- * to the SMC instruction. The return values are updated with the content
- * from register 0 to 3 on return from the SMC instruction if not NULL.
+ * to the SMC instruction.
  *
  * We have an output list that is not necessarily used, and GCC feels
  * entitled to optimise the whole sequence away. "volatile" is what
  * makes it stick.
  */
 #define arm_smccc_1_1_smc(...)                                  \
-    do {                                                        \
+    ({                                                          \
         register unsigned long r0 ASM_REG(0);                   \
         register unsigned long r1 ASM_REG(1);                   \
         register unsigned long r2 ASM_REG(2);                   \
         register unsigned long r3 ASM_REG(3);                   \
-        __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+        __declare_args(count_args(__VA_ARGS__), __VA_ARGS__);   \
         asm volatile (                                          \
             "smc #0"                                            \
             : "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)        \
             : PASTE(__constraint_read_,                         \
-                    __count_args(__VA_ARGS__))                  \
+                    count_args(__VA_ARGS__))                    \
             : "memory" );                                       \
-        if ( ___res )                                           \
-            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
-    } while ( 0 )
+        (struct arm_smccc_res){ r0, r1, r2, r3 };               \
+    })
 
 /*
  * The calling convention for arm32 is the same for both SMCCC v1.0 and
@@ -208,8 +199,8 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 {
     struct arm_smccc_res res;
 
-    arm_smccc_1_1_smc(regs->r0, regs->r1, regs->r2, regs->r3,
-                      regs->r4, regs->r5, regs->r6, regs->r7, &res);
+    res = arm_smccc_1_1_smc(regs->r0, regs->r1, regs->r2, regs->r3,
+                            regs->r4, regs->r5, regs->r6, regs->r7);
 
     regs->r0 = res.a0;
     regs->r1 = res.a1;
@@ -226,7 +217,7 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
  * are strictly preserved.  Always mark x4 through x17 as clobbered.
  */
 #define arm_smccc_smc(...)                                      \
-    do {                                                        \
+    ({                                                          \
         register unsigned long r0  ASM_REG(0);                  \
         register unsigned long r1  ASM_REG(1);                  \
         register unsigned long r2  ASM_REG(2);                  \
@@ -246,7 +237,7 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
         register unsigned long c15 ASM_REG(15);                 \
         register unsigned long c16 ASM_REG(16);                 \
         register unsigned long c17 ASM_REG(17);                 \
-        __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+        __declare_args(count_args(__VA_ARGS__), __VA_ARGS__);   \
         asm volatile (                                          \
             "smc #0"                                            \
             : "=r" (r0),  "=r" (r1),  "=r" (r2),  "=r" (r3),    \
@@ -255,11 +246,10 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
               "=r" (c12), "=r" (c13), "=r" (c14), "=r" (c15),   \
               "=r" (c16), "=r" (c17)                            \
             : PASTE(__constraint_read_,                         \
-                    __count_args(__VA_ARGS__))                  \
+                    count_args(__VA_ARGS__))                    \
             : "memory" );                                       \
-        if ( ___res )                                           \
-            *___res = (struct arm_smccc_res){ r0, r1, r2, r3 }; \
-    } while ( 0 )
+        (struct arm_smccc_res){ r0, r1, r2, r3 };               \
+    })
 
 #define arm_smccc_1_1_smc(...) arm_smccc_smc(__VA_ARGS__)
 
@@ -268,8 +258,8 @@ static inline void arm_smccc_guest_smc(struct cpu_user_regs *regs)
 {
     struct arm_smccc_res res;
 
-    arm_smccc_1_1_smc(regs->x0, regs->x1, regs->x2, regs->x3,
-                      regs->x4, regs->x5, regs->x6, regs->x7, &res);
+    res = arm_smccc_1_1_smc(regs->x0, regs->x1, regs->x2, regs->x3,
+                            regs->x4, regs->x5, regs->x6, regs->x7);
 
     regs->x0 = res.a0;
     regs->x1 = res.a1;
diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
index f7c0952067..f08d50c1fe 100644
--- a/xen/arch/arm/platforms/exynos5.c
+++ b/xen/arch/arm/platforms/exynos5.c
@@ -249,7 +249,7 @@ static int exynos5_cpu_up(int cpu)
     iounmap(power);
 
     if ( secure_firmware )
-        arm_smccc_smc(SMC_CMD_CPU1BOOT, cpu, NULL);
+        arm_smccc_smc(SMC_CMD_CPU1BOOT, cpu);
 
     return cpu_up_send_sgi(cpu);
 }
diff --git a/xen/arch/arm/platforms/seattle.c b/xen/arch/arm/platforms/seattle.c
index 64cc1868c2..dfa5cf4265 100644
--- a/xen/arch/arm/platforms/seattle.c
+++ b/xen/arch/arm/platforms/seattle.c
@@ -33,12 +33,12 @@ static const char * const seattle_dt_compat[] __initconst =
  */
 static void seattle_system_reset(void)
 {
-    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET, NULL);
+    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET);
 }
 
 static void seattle_system_off(void)
 {
-    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF, NULL);
+    arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF);
 }
 
 PLATFORM_START(seattle, "SEATTLE")
diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c
index b6860a7760..634d0d7467 100644
--- a/xen/arch/arm/psci.c
+++ b/xen/arch/arm/psci.c
@@ -41,8 +41,8 @@ int call_psci_cpu_on(int cpu)
 {
     struct arm_smccc_res res;
 
-    arm_smccc_smc(psci_cpu_on_nr, cpu_logical_map(cpu), __pa(init_secondary),
-                  &res);
+    res = arm_smccc_smc(psci_cpu_on_nr, cpu_logical_map(cpu),
+                        __pa(init_secondary));
 
     return PSCI_RET(res);
 }
@@ -54,7 +54,7 @@ void call_psci_cpu_off(void)
         struct arm_smccc_res res;
 
         /* If successfull the PSCI cpu_off call doesn't return */
-        arm_smccc_smc(PSCI_0_2_FN32_CPU_OFF, &res);
+        res = arm_smccc_smc(PSCI_0_2_FN32_CPU_OFF);
         panic("PSCI cpu off failed for CPU%d err=%d\n", smp_processor_id(),
               PSCI_RET(res));
     }
@@ -63,13 +63,13 @@ void call_psci_cpu_off(void)
 void call_psci_system_off(void)
 {
     if ( psci_ver > PSCI_VERSION(0, 1) )
-        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF, NULL);
+        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_OFF);
 }
 
 void call_psci_system_reset(void)
 {
     if ( psci_ver > PSCI_VERSION(0, 1) )
-        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET, NULL);
+        arm_smccc_smc(PSCI_0_2_FN32_SYSTEM_RESET);
 }
 
 static int __init psci_features(uint32_t psci_func_id)
@@ -79,7 +79,7 @@ static int __init psci_features(uint32_t psci_func_id)
     if ( psci_ver < PSCI_VERSION(1, 0) )
         return PSCI_NOT_SUPPORTED;
 
-    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, &res);
+    res = arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id);
 
     return PSCI_RET(res);
 }
@@ -116,9 +116,8 @@ static void __init psci_init_smccc(void)
 
     if ( psci_features(ARM_SMCCC_VERSION_FID) != PSCI_NOT_SUPPORTED )
     {
-        struct arm_smccc_res res;
+        struct arm_smccc_res res = arm_smccc_smc(ARM_SMCCC_VERSION_FID);
 
-        arm_smccc_smc(ARM_SMCCC_VERSION_FID, &res);
         if ( PSCI_RET(res) != ARM_SMCCC_NOT_SUPPORTED )
             smccc_ver = PSCI_RET(res);
     }
@@ -191,7 +190,7 @@ static int __init psci_init_0_2(void)
         }
     }
 
-    arm_smccc_smc(PSCI_0_2_FN32_PSCI_VERSION, &res);
+    res = arm_smccc_smc(PSCI_0_2_FN32_PSCI_VERSION);
     psci_ver = PSCI_RET(res);
 
     /* For the moment, we only support PSCI 0.2 and PSCI 1.x */
diff --git a/xen/arch/arm/tee/optee.c b/xen/arch/arm/tee/optee.c
index 3d26332370..5e94daee06 100644
--- a/xen/arch/arm/tee/optee.c
+++ b/xen/arch/arm/tee/optee.c
@@ -178,7 +178,7 @@ static bool optee_probe(void)
         return false;
 
     /* Check UID */
-    arm_smccc_smc(ARM_SMCCC_CALL_UID_FID(TRUSTED_OS_END), &resp);
+    resp = arm_smccc_smc(ARM_SMCCC_CALL_UID_FID(TRUSTED_OS_END));
 
     if ( (uint32_t)resp.a0 != OPTEE_MSG_UID_0 ||
          (uint32_t)resp.a1 != OPTEE_MSG_UID_1 ||
@@ -187,7 +187,7 @@ static bool optee_probe(void)
         return false;
 
     /* Read number of threads */
-    arm_smccc_smc(OPTEE_SMC_GET_THREAD_COUNT, &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_GET_THREAD_COUNT);
     if ( resp.a0 == OPTEE_SMC_RETURN_OK )
     {
         max_optee_threads = resp.a1;
@@ -209,7 +209,7 @@ static bool optee_probe(void)
      * call. It will return OPTEE_SMC_RETURN_UNKNOWN_FUNCTION if
      * OP-TEE have no virtualization support enabled.
      */
-    arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, 0, 0, 0, 0, 0, 0, 0, &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, 0, 0, 0, 0, 0, 0, 0);
     if ( resp.a0 == OPTEE_SMC_RETURN_UNKNOWN_FUNCTION )
         return false;
 
@@ -243,8 +243,8 @@ static int optee_domain_init(struct domain *d)
      *
      * a7 should be 0, so we can't skip last 6 parameters of arm_smccc_smc()
      */
-    arm_smccc_smc(OPTEE_SMC_VM_CREATED, OPTEE_CLIENT_ID(d), 0, 0, 0, 0, 0, 0,
-                  &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_VM_CREATED, OPTEE_CLIENT_ID(d),
+                         0, 0, 0, 0, 0, 0);
     if ( resp.a0 != OPTEE_SMC_RETURN_OK )
     {
         printk(XENLOG_WARNING "%pd: Unable to create OPTEE client: rc = 0x%X\n",
@@ -681,8 +681,8 @@ static int optee_relinquish_resources(struct domain *d)
      *
      * a7 should be 0, so we can't skip last 6 parameters of arm_smccc_smc()
      */
-    arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, OPTEE_CLIENT_ID(d), 0, 0, 0, 0, 0, 0,
-                  &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_VM_DESTROYED, OPTEE_CLIENT_ID(d),
+                         0, 0, 0, 0, 0, 0);
 
     ASSERT(!spin_is_locked(&ctx->lock));
     ASSERT(!atomic_read(&ctx->call_count));
@@ -1171,15 +1171,15 @@ static void do_call_with_arg(struct optee_domain *ctx,
 {
     struct arm_smccc_res res;
 
-    arm_smccc_smc(a0, a1, a2, a3, a4, a5, 0, OPTEE_CLIENT_ID(current->domain),
-                  &res);
+    res = arm_smccc_smc(a0, a1, a2, a3, a4, a5, 0,
+                        OPTEE_CLIENT_ID(current->domain));
 
     if ( OPTEE_SMC_RETURN_IS_RPC(res.a0) )
     {
         while ( handle_rpc_return(ctx, &res, regs, call)  == -ERESTART )
         {
-            arm_smccc_smc(res.a0, res.a1, res.a2, res.a3, 0, 0, 0,
-                          OPTEE_CLIENT_ID(current->domain), &res);
+            res = arm_smccc_smc(res.a0, res.a1, res.a2, res.a3, 0, 0, 0,
+                                OPTEE_CLIENT_ID(current->domain));
 
             if ( !OPTEE_SMC_RETURN_IS_RPC(res.a0) )
                 break;
@@ -1619,8 +1619,8 @@ static void handle_exchange_capabilities(struct cpu_user_regs *regs)
     caps = get_user_reg(regs, 1);
     caps &= OPTEE_KNOWN_NSEC_CAPS;
 
-    arm_smccc_smc(OPTEE_SMC_EXCHANGE_CAPABILITIES, caps, 0, 0, 0, 0, 0,
-                  OPTEE_CLIENT_ID(current->domain), &resp);
+    resp = arm_smccc_smc(OPTEE_SMC_EXCHANGE_CAPABILITIES, caps, 0, 0, 0, 0, 0,
+                         OPTEE_CLIENT_ID(current->domain));
     if ( resp.a0 != OPTEE_SMC_RETURN_OK ) {
         set_user_reg(regs, 0, resp.a0);
         return;
@@ -1664,8 +1664,8 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_CALLS_UID:
-        arm_smccc_smc(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALLS_UID, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         set_user_reg(regs, 2, resp.a2);
@@ -1673,15 +1673,15 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_CALLS_REVISION:
-        arm_smccc_smc(OPTEE_SMC_CALLS_REVISION, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALLS_REVISION, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         return true;
 
     case OPTEE_SMC_CALL_GET_OS_UUID:
-        arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_UUID, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain),&resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_UUID, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         set_user_reg(regs, 2, resp.a2);
@@ -1689,21 +1689,21 @@ static bool optee_handle_call(struct cpu_user_regs *regs)
         return true;
 
     case OPTEE_SMC_CALL_GET_OS_REVISION:
-        arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_CALL_GET_OS_REVISION, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         set_user_reg(regs, 1, resp.a1);
         return true;
 
     case OPTEE_SMC_ENABLE_SHM_CACHE:
-        arm_smccc_smc(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_ENABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         return true;
 
     case OPTEE_SMC_DISABLE_SHM_CACHE:
-        arm_smccc_smc(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
-                      OPTEE_CLIENT_ID(current->domain), &resp);
+        resp = arm_smccc_smc(OPTEE_SMC_DISABLE_SHM_CACHE, 0, 0, 0, 0, 0, 0,
+                             OPTEE_CLIENT_ID(current->domain));
         set_user_reg(regs, 0, resp.a0);
         if ( resp.a0 == OPTEE_SMC_RETURN_OK ) {
             free_shm_rpc(ctx,  regpair_to_uint64(resp.a1, resp.a2));
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 625d229396..6a5dcef2aa 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1991,7 +1991,7 @@ void asmlinkage enter_hypervisor_from_guest_preirq(void)
 
     /* If the guest has disabled the workaround, bring it back on. */
     if ( needs_ssbd_flip(v) )
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 1);
 }
 
 /*
@@ -2334,7 +2334,7 @@ void asmlinkage leave_hypervisor_to_guest(void)
      * If the guest wants it disabled, so be it...
      */
     if ( needs_ssbd_flip(current) )
-        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0, NULL);
+        arm_smccc_1_1_smc(ARM_SMCCC_ARCH_WORKAROUND_2_FID, 0);
 }
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 13:11:09 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 13:11:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410855.1641667 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Z7n-0006Ae-Hf; Mon, 07 Sep 2026 13:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410855.1641667; Mon, 07 Sep 2026 13:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Z7n-0006AW-Eq; Mon, 07 Sep 2026 13:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1410855;
 Mon, 07 Sep 2026 13:11:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Z7l-0006AP-TT
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 13:11:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Z7l-003CWG-0x
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 13:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Z7l-007sxp-1n
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 13:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=gCxqWqn+4QefA+GIiWAp5/bhChAqs3zQIiudCqVY5vc=; b=pP5tb5M+g2Ln3IqMT7/wpRgfco
	P7rILJRXA331aTMEftQf3S7ToR89Yae6gpu9Cv4+59+xWswej+Uip1frfrQNTPMIgArilRuJE5zlC
	iTGM+KGK8+gKYjPYR+JMKCal6XOTYNGgrToe8wVuak15IgdmxW0Xe2/MBquhjcc82ovQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/vRTC: don't overrun array when storing century field
Message-Id: <E1x3Z7l-007sxp-1n@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 13:11:01 +0000

commit 44a6486a4f4b4dff5b781c6e6cb22b65ac7a5373
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 14:11:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 14:11:18 2026 +0200

    x86/vRTC: don't overrun array when storing century field
    
    rtc_ioport_write() has two writes of the new value, yet only one was made
    aware of the century going outside of the array. Fold both writes by
    changing the RTC_SET short-circuiting.
    
    Fixes: f2ff80877f66 ("x86/vRTC: support century field")
    Coverity ID: 1700943
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/rtc.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 4e0d28d1ea..184e334ee6 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -521,20 +521,22 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
     case RTC_MONTH:
     case RTC_YEAR:
     case RTC_CENTURY:
-        /* if in set mode, just write the register */
-        if ( (s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
-            s->hw.cmos_data[s->hw.cmos_index] = data;
-        else
+        /* If in set mode, just write the register. */
+        if ( !(s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
         {
             /* Fetch the current time and update just this field. */
             s->current_tm = gmtime(get_localtime(d));
             rtc_copy_date(s);
-            if ( s->hw.cmos_index != RTC_CENTURY )
-                s->hw.cmos_data[s->hw.cmos_index] = data;
-            else
-                s->hw.century = data;
-            rtc_set_time(s);
         }
+
+        if ( s->hw.cmos_index != RTC_CENTURY )
+            s->hw.cmos_data[s->hw.cmos_index] = data;
+        else
+            s->hw.century = data;
+
+        if ( !(s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
+            rtc_set_time(s);
+
         alarm_timer_update(s);
         break;
     case RTC_REG_A:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 13:11:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 13:11:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410856.1641671 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Z7x-0006DI-J1; Mon, 07 Sep 2026 13:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410856.1641671; Mon, 07 Sep 2026 13:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3Z7x-0006DA-G5; Mon, 07 Sep 2026 13:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1410856;
 Mon, 07 Sep 2026 13:11:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3Z7v-0006Cv-Nw
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 13:11:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Z7v-003CWK-1F
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 13:11:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3Z7v-007tz6-2C
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 13:11:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sueEtL2PXG2BSNXNp46r+CvxoTCFigOI/vB2/HEHWMY=; b=NMWyUkkR/jt8oVGPGEp8KCTzkk
	AD5KRLTItyXNni4UfdReTvjDaKVLjD6zIO3fSNqBXK3+5wuYgZRkFQhS+ExpQI6XsXPEbY2VPPBN6
	v/M7qyN0TRAPhf/yqL0Ugbn9ZYBD69lNCBf5+YDC2kK0R+ioMZK8i8o0WTCglKAfLGYc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] libacpi: drop mk_dsdt's -d / --debug option
Message-Id: <E1x3Z7v-007tz6-2C@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 13:11:11 +0000

commit f907784c320da65c912ea04ed9f83f29e59dbd87
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 14:11:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 14:11:35 2026 +0200

    libacpi: drop mk_dsdt's -d / --debug option
    
    Recent Clang complains about the "debug" static variable only ever being
    written to. Drop it and the command line option controlling it.
    
    Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 tools/libacpi/Makefile  | 8 ++++----
 tools/libacpi/mk_dsdt.c | 7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index 193ec78672..3b4c3d8c86 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSD
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
@@ -51,17 +51,17 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl  $(MK_DSDT)
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
 	cat dsdt_acpi_info.asl >> $@
-	$(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@
+	$(MK_DSDT) --maxcpu any --dm-version none >> $@
 
 $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 3, \"Xen\", \"ARM\", 1)\n{" > $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index f71de6c8c6..001c3875c3 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -15,7 +15,6 @@
 #endif
 
 static unsigned int indent_level;
-static bool debug = false;
 
 typedef enum dm_version {
     QEMU_NONE,
@@ -73,7 +72,6 @@ static struct option options[] = {
 #ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
 #endif
-    { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
@@ -125,10 +123,7 @@ int main(int argc, char **argv)
             }
             break;
 #endif
-        case 'd':
-            if (*optarg == 'y')
-                debug = true;
-            break;
+
         default:
             return -1;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 14:00:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 14:00:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410895.1641702 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ZtD-0007Qg-Hf; Mon, 07 Sep 2026 14:00:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410895.1641702; Mon, 07 Sep 2026 14:00:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ZtD-0007QM-Es; Mon, 07 Sep 2026 14:00:03 +0000
Received: by outflank-mailman (input) for mailman id 1410895;
 Mon, 07 Sep 2026 14:00:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ZtC-00079X-BA
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 14:00:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ZtB-003DVX-2n
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 14:00:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ZtC-00BeSL-0W
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 14:00:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=uVRRxraSgvWt76QAJq3vAOmaJLfRpRWO1c5ZfhL6RhU=; b=eXiKbfsjFwH+p4W2oOVWwVMEs+
	oM3C9KRZppDO9QjxUfQ6NVbIujww/osLgJwpyQYfmVv5iUdMu1Xxk0NhA7ojP9m4tzLHJbV25sCNP
	LywAezDfn5ElLiCELYnAbmvoldnbl3fCsYodtsauzwnOM/6HfmuzbJ5Ehjda3D0YPUcM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/vRTC: don't overrun array when storing century field
Message-Id: <E1x3ZtC-00BeSL-0W@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 14:00:02 +0000

commit 44a6486a4f4b4dff5b781c6e6cb22b65ac7a5373
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 14:11:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 14:11:18 2026 +0200

    x86/vRTC: don't overrun array when storing century field
    
    rtc_ioport_write() has two writes of the new value, yet only one was made
    aware of the century going outside of the array. Fold both writes by
    changing the RTC_SET short-circuiting.
    
    Fixes: f2ff80877f66 ("x86/vRTC: support century field")
    Coverity ID: 1700943
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/rtc.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 4e0d28d1ea..184e334ee6 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -521,20 +521,22 @@ static int rtc_ioport_write(RTCState *s, uint32_t addr, uint32_t data)
     case RTC_MONTH:
     case RTC_YEAR:
     case RTC_CENTURY:
-        /* if in set mode, just write the register */
-        if ( (s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
-            s->hw.cmos_data[s->hw.cmos_index] = data;
-        else
+        /* If in set mode, just write the register. */
+        if ( !(s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
         {
             /* Fetch the current time and update just this field. */
             s->current_tm = gmtime(get_localtime(d));
             rtc_copy_date(s);
-            if ( s->hw.cmos_index != RTC_CENTURY )
-                s->hw.cmos_data[s->hw.cmos_index] = data;
-            else
-                s->hw.century = data;
-            rtc_set_time(s);
         }
+
+        if ( s->hw.cmos_index != RTC_CENTURY )
+            s->hw.cmos_data[s->hw.cmos_index] = data;
+        else
+            s->hw.century = data;
+
+        if ( !(s->hw.cmos_data[RTC_REG_B] & RTC_SET) )
+            rtc_set_time(s);
+
         alarm_timer_update(s);
         break;
     case RTC_REG_A:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 07 14:00:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 07 Sep 2026 14:00:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1410896.1641706 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ZtN-00083U-Im; Mon, 07 Sep 2026 14:00:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1410896.1641706; Mon, 07 Sep 2026 14:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ZtN-00083M-GF; Mon, 07 Sep 2026 14:00:13 +0000
Received: by outflank-mailman (input) for mailman id 1410896;
 Mon, 07 Sep 2026 14:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ZtM-00083G-AM
 for xen-changelog@lists.xenproject.org; Mon, 07 Sep 2026 14:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ZtL-003DVd-34
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 14:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ZtM-00BfIf-0n
 for xen-changelog@lists.xenproject.org;
 Mon, 07 Sep 2026 14:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=v4KJlwoBL7Nm/836CFOaWXizd9WSTP0SI5Pjy15yIuw=; b=j8SYwcCbLApDbEib1H7sA+LqRP
	J63uY8GkIKhFS6ZmPyuGj+qgfZ6BCwvdrQhmsY6rUdYQSQcLt2gsOhavaqk5RfXXfjlGupQ81CITt
	2tFGOwL4PUGv3OUyOY2p3vtn0xp/bNcI51/Ifd1M/qcleO7ScJ8geNKV7cZUSvXi7Fsc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] libacpi: drop mk_dsdt's -d / --debug option
Message-Id: <E1x3ZtM-00BfIf-0n@xenbits.xenproject.org>
Date: Mon, 07 Sep 2026 14:00:12 +0000

commit f907784c320da65c912ea04ed9f83f29e59dbd87
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 7 14:11:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 7 14:11:35 2026 +0200

    libacpi: drop mk_dsdt's -d / --debug option
    
    Recent Clang complains about the "debug" static variable only ever being
    written to. Drop it and the command line option controlling it.
    
    Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 tools/libacpi/Makefile  | 8 ++++----
 tools/libacpi/mk_dsdt.c | 7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index 193ec78672..3b4c3d8c86 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSD
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
@@ -51,17 +51,17 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl  $(MK_DSDT)
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
 	cat dsdt_acpi_info.asl >> $@
-	$(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@
+	$(MK_DSDT) --maxcpu any --dm-version none >> $@
 
 $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 3, \"Xen\", \"ARM\", 1)\n{" > $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index f71de6c8c6..001c3875c3 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -15,7 +15,6 @@
 #endif
 
 static unsigned int indent_level;
-static bool debug = false;
 
 typedef enum dm_version {
     QEMU_NONE,
@@ -73,7 +72,6 @@ static struct option options[] = {
 #ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
 #endif
-    { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
@@ -125,10 +123,7 @@ int main(int argc, char **argv)
             }
             break;
 #endif
-        case 'd':
-            if (*optarg == 'y')
-                debug = true;
-            break;
+
         default:
             return -1;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 09:22:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 09:22:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411217.1641917 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3s1i-0005hG-Jt; Tue, 08 Sep 2026 09:22:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411217.1641917; Tue, 08 Sep 2026 09:22:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3s1i-0005h7-GL; Tue, 08 Sep 2026 09:22:02 +0000
Received: by outflank-mailman (input) for mailman id 1411217;
 Tue, 08 Sep 2026 09:22:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3s1h-0005gx-J9
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 09:22:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3s1h-004kBX-0Q
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 09:22:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3s1h-0020RG-1K
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 09:22:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=coGTZbkNmjLgXOY3wJcZ3RPnlaAppGqCTxibpPHiJXI=; b=cnhob7xzRiGG8l9DhW3Co6n8A6
	9eel0RlNDcyaTfZ6BvWScf9V8XKisB2uuAiKFJRHGOHeVYFYqTzBSXsn5AiLt6viAaYG52aEH4mzk
	CxqlZSuUMUKSj4rmrUi7Uv2RfrWJBAj106LPEZf5nb67vhzwzWwphD4xXiIdNB1og91c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x3s1h-0020RG-1K@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 09:22:01 +0000

commit f7eab298bb9f2634e555aea1db70efcbbfd4d316
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 8 07:59:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 8 09:50:48 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 179eb20f4e..7ebfb0b7e3 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -263,7 +263,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 10:11:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 10:11:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411271.1641965 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3sn8-00062e-PX; Tue, 08 Sep 2026 10:11:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411271.1641965; Tue, 08 Sep 2026 10:11:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3sn8-00062W-Md; Tue, 08 Sep 2026 10:11:02 +0000
Received: by outflank-mailman (input) for mailman id 1411271;
 Tue, 08 Sep 2026 10:11:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3sn7-00062Q-Rs
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 10:11:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3sn7-004l6x-04
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 10:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3sn7-006GZ4-10
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 10:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=OwrK3s1FDf82OXJsijBjxtGKUDEooq/3ohNni3y5yes=; b=K3PkpijZbGhYl26O2EBBxvrbpu
	AukoC6J6k4DHXwkko5t+IEO0N1l74vz4to9klVCVnozYNg1py4uY88xVdE0xHXti92wd7BZf6+KCq
	Y9vqP74XgZC00Hg3iHsM8te6Eb3LWZ9qwnq6+uKbUc6COzHKDHTtn/TWHHW8I1Ru0WSg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x3sn7-006GZ4-10@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 10:11:01 +0000

commit f7eab298bb9f2634e555aea1db70efcbbfd4d316
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 8 07:59:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 8 09:50:48 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 179eb20f4e..7ebfb0b7e3 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -263,7 +263,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:11:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:11:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411818.1642196 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufI-0000lU-4L; Tue, 08 Sep 2026 12:11:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411818.1642196; Tue, 08 Sep 2026 12:11:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufI-0000lM-1Y; Tue, 08 Sep 2026 12:11:04 +0000
Received: by outflank-mailman (input) for mailman id 1411818;
 Tue, 08 Sep 2026 12:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ufG-0000lF-47
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufF-004nIy-27
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufF-000AEC-32
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IHmGiDDsFaranLokezlvX4gidOpFFPXhIzIMcuuGhGY=; b=yO7dNSOFKfsZL+sEfclSFSmMHZ
	yHTZ1rDmqAD1XMSWcDQMrUmuoexwUkZSsgt+bm0JDTF6x09XJiPKzS3SYWI6wI6yxEX+M93uU/v5l
	ZOTnVTFx8YTaO7WkzbrRJ5Modgdp8heG2DM70eqHDrzJDOXsc53viNJF4NBksJz/yKGU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3ufF-000AEC-32@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:11:01 +0000

commit 328a1461430f82d5f0318511e71b7143cdbca872
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:36:26 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    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>
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index b73bb55055..32632a3b15 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:11:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:11:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411819.1642199 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufS-0000na-5l; Tue, 08 Sep 2026 12:11:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411819.1642199; Tue, 08 Sep 2026 12:11:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufS-0000nQ-2x; Tue, 08 Sep 2026 12:11:14 +0000
Received: by outflank-mailman (input) for mailman id 1411819;
 Tue, 08 Sep 2026 12:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ufQ-0000my-3Q
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufP-004nJM-2Q
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufQ-000BOe-08
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=RZk6hAGBg/s0vhnDhWAfFZtZvcL5PJ9oW26tOREOTXM=; b=e3m0AzfFi8wIUsOnoijjzgNdBb
	uW05deVF9Dji+XMCtFjMoc8Cj0v0eVwzzZHNvg93xrfxglHB9cSxJoPpNGzXgnoHxxIsOHmz8n/ym
	s7pbpWH7/4hst8mK432ZEetvRTQc+50AlC8KDvbRIw18F5cYZOIzCzjFG4vJnCmCiVcI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3ufQ-000BOe-08@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:11:12 +0000

commit 62aff073266bd83fa2d675913d913134abd3c82b
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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 2efb1d4f08..c09ea002ec 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:
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:11:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:11:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411820.1642204 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufc-0000pU-6m; Tue, 08 Sep 2026 12:11:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411820.1642204; Tue, 08 Sep 2026 12:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufc-0000pM-4B; Tue, 08 Sep 2026 12:11:24 +0000
Received: by outflank-mailman (input) for mailman id 1411820;
 Tue, 08 Sep 2026 12:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ufa-0000pF-6O
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufZ-004nJT-2i
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufa-000CVt-0R
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=33RMkNdfPgmQBAZX0+p2gyTndjtinNu11tjBOI9O2yE=; b=zcrTnna5pxNgMjonMpMZiIFfk6
	1HePoQpQuJBXtIJtrZK0nyCrgc/Y/DhGehLmdyz4jEQ628b24fMfZ2kbse3nkwXr4q27W6XwpPjum
	TfOPv3AA2TfNMbfHggYx7zMU9WNYXYCcG8n1l6doQYGcaycbgHf4MZlmwGjMMMR8etcA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3ufa-000CVt-0R@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:11:22 +0000

commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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 9443e35a7f..4afa2271b7 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -233,8 +233,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) )
@@ -246,15 +244,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
@@ -397,13 +386,6 @@ static void populate_physmap(struct memop_args *a)
                     }
                 }
 
-                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);
             }
 
@@ -418,9 +400,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 1e47f38721..62ac89b824 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1101,15 +1101,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)) )
     {
@@ -1145,9 +1147,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.
@@ -1409,6 +1408,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
@@ -2077,7 +2083,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;
 
@@ -2106,13 +2112,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 )
@@ -2121,9 +2130,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));
 
@@ -3041,9 +3047,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 fd8b0ba3f5..153c57f5dd 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -222,8 +222,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
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:11:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:11:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411821.1642207 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufl-0000rQ-89; Tue, 08 Sep 2026 12:11:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411821.1642207; Tue, 08 Sep 2026 12:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufl-0000rI-5X; Tue, 08 Sep 2026 12:11:33 +0000
Received: by outflank-mailman (input) for mailman id 1411821;
 Tue, 08 Sep 2026 12:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ufk-0000rC-9z
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufj-004nJb-34
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufk-000DlK-0n
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IlslG9VySa2J9rQZx6B1BgYGmz9IJmNGS3O+etVFfSg=; b=EVM5nhqfwmt2vPu2e2mj1q8JgA
	B+xKBSZOzERgBuKp/8qr6PlKjv2yWf7UAsCmo90TJKNYncnMPjZ/6/iI/GQ41GuPCdHdT3ufgLC/C
	ABBVdqejsgPCuEa4CVFG4WVG45DpCi9+GkpnvX2NoR+6iQnv3TFwhA0EV4aeH9L6OrzI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3ufk-000DlK-0n@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:11:32 +0000

commit 9c5a46b12066da7311a8d43202abd78956ab0bfb
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    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>
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:11:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:11:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411822.1642212 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufv-0000tN-9S; Tue, 08 Sep 2026 12:11:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411822.1642212; Tue, 08 Sep 2026 12:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ufv-0000tF-6q; Tue, 08 Sep 2026 12:11:43 +0000
Received: by outflank-mailman (input) for mailman id 1411822;
 Tue, 08 Sep 2026 12:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ufu-0000t6-Cu
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufu-004nJi-08
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ufu-000F4c-14
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Hy4nJYWCebvkVIo8t55vD75H879aaXy/ArFcFb1eR7M=; b=eR5ZaltpEIeXXsbOCseNkjdKTW
	BnKuiKwAnlEsZP4N6F8YtTBAt00EpYOYdcvLSaRvj3DNAL692IXUDhrQUBsEZbmrQcB8ZUC/wEEQa
	K4zl+Rk1ql5d6OqHiy0sEyvnpJcDxGapoFG5gSqM2aLomt7GBL9sOwi9aUez+iDcw8kY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3ufu-000F4c-14@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:11:42 +0000

commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    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>
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:11:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:11:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411823.1642216 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ug5-0000vK-Af; Tue, 08 Sep 2026 12:11:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411823.1642216; Tue, 08 Sep 2026 12:11:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ug5-0000vC-8A; Tue, 08 Sep 2026 12:11:53 +0000
Received: by outflank-mailman (input) for mailman id 1411823;
 Tue, 08 Sep 2026 12:11:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ug4-0000v6-TW
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:11:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ug4-004nJq-1l
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ug4-000GOn-2h
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:11:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2H2ZBJWCJ81C2UbJ4msMfBzcW7w0mDk5ZKYVBRgIa6Q=; b=JqChdWIehtX81wlbyLFqKYewVr
	Yj4sQBvRn55krMC9Lt05ziSJXLYlhRTZhyEYq4fPe10B8b4WyiUZij+s8RQe/5mUh/pxTglO3BWDL
	94X8Kl/13fHx68Z+R0r/l2Wao2hcrDlPLGwVM4C5e7zPGlDwwFHD3sut7oeYpt7SED0c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3ug4-000GOn-2h@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:11:52 +0000

commit cad43d95a2a3c95b3d75f56b8db3e08410757305
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:47:41 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index b73bb55055..32632a3b15 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:12:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:12:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411824.1642221 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugF-0000xo-Ds; Tue, 08 Sep 2026 12:12:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411824.1642221; Tue, 08 Sep 2026 12:12:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugF-0000xg-As; Tue, 08 Sep 2026 12:12:03 +0000
Received: by outflank-mailman (input) for mailman id 1411824;
 Tue, 08 Sep 2026 12:12:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ugE-0000xa-W7
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:12:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugE-004nK9-24
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugE-000Hh3-30
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Kz+JKhPK7vUuEmByFptlDi8pyvTRVohnuAzzWCTDtME=; b=Pqtvj0iokti4Se7pp0NMvn1lyW
	dZROG8ELL+umsPmj1wDmj8z+TxAJr/LEltktXu6R1Mqrb1H4R/2FMse2RVDfxHbHXBAJw1NiJJhQq
	8ZdElzcb/+GByyfOV8UoMT9rKl1BK9T274oPdFqR1zsiWep7tQLjvpfErrF8rBiete0E=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3ugE-000Hh3-30@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:12:02 +0000

commit 41f73fe55bad6269bc03e25bf878ab608017acee
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 2efb1d4f08..c09ea002ec 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:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:12:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:12:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411825.1642224 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugQ-000100-Ew; Tue, 08 Sep 2026 12:12:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411825.1642224; Tue, 08 Sep 2026 12:12:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugQ-0000zs-CN; Tue, 08 Sep 2026 12:12:14 +0000
Received: by outflank-mailman (input) for mailman id 1411825;
 Tue, 08 Sep 2026 12:12:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ugP-0000zU-2h
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:12:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugO-004nKa-2M
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugP-000Itk-06
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=BwWJzYDCzLCyCtN2NTXxa+WbyaednXqXWwQDST5/ouo=; b=oeIZPsN5s/nkwXpKdZxjL10OVT
	pjRxn80luMiJ1FpwpQmeSqOSeuYVhZf/EEDpFGtNInVYSjcw9Dq0z3YvGBtCM1CdQmBYbyYS8rXyL
	TkyVB+m2oj3aIibfRG98jT+9KroUJ5zg9yTsjNe7zXHVQ26oPw5UPtBpEGZ423RVSrh4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3ugP-000Itk-06@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:12:13 +0000

commit 7c95e794d9124b0968e172fe9836f367053d9627
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 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 e245b160d4..ff2ed61fe2 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -232,8 +232,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) )
@@ -245,15 +243,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
@@ -396,13 +385,6 @@ static void populate_physmap(struct memop_args *a)
                     }
                 }
 
-                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);
             }
 
@@ -417,9 +399,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 40b0f73563..3f9f46dd58 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1099,15 +1099,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)) )
     {
@@ -1143,9 +1145,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.
@@ -1399,6 +1398,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
@@ -2066,7 +2072,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;
 
@@ -2095,13 +2101,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 )
@@ -2110,9 +2119,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));
 
@@ -3027,9 +3033,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 b80bec00c1..379a8e4cbe 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -222,8 +222,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
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:12:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:12:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411826.1642227 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uga-00011x-GH; Tue, 08 Sep 2026 12:12:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411826.1642227; Tue, 08 Sep 2026 12:12:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uga-00011p-Dl; Tue, 08 Sep 2026 12:12:24 +0000
Received: by outflank-mailman (input) for mailman id 1411826;
 Tue, 08 Sep 2026 12:12:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ugZ-00011h-5X
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:12:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugY-004nKj-2e
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugZ-000K2b-0M
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=jK27x0Tvr4HCLL22WN3tReS0DSt45EecFVRfEqGpmo4=; b=lIgBP5G+/qydRfI0tLnRf4fBb7
	kTPPTsYBbCeR2JVxrBFtNQeZuHEdSobtzwoRDDx1gxkCICs3OTI2coBxV0x4SByFh0b1xUwAvxpPX
	FNYs672ktFGJKfEdjP1jwUUjceqe7SJFmsPo9niXmnDPdOGVs4ODKveX/HSkvY8d0ONM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3ugZ-000K2b-0M@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:12:23 +0000

commit 68e24b9c95e90879dc5cc9a242e62e5e5867b123
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:12:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:12:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411827.1642232 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugk-00013r-Hb; Tue, 08 Sep 2026 12:12:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411827.1642232; Tue, 08 Sep 2026 12:12:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugk-00013j-F7; Tue, 08 Sep 2026 12:12:34 +0000
Received: by outflank-mailman (input) for mailman id 1411827;
 Tue, 08 Sep 2026 12:12:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ugj-00013d-8l
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:12:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugi-004nKp-2x
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugj-000LFx-0e
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qqx4YlPQQPRapHOroUFQbzwA7cb5ANMKnTDsRqS/K/w=; b=6yfnTWfG3Ss639m01duhrhpHFV
	3zbhS45mkAFierUXcqeKHYjlgMbTo8X0C9I8uWmH11QJSnWPFiOxa8l322sbJ3UQeATFWf5qu28jZ
	vRo4ISRSettC7V4EkmaxFG0aV7Lf9nMS09AFpkBSCkUIlQQCU2ei4uOCvoPcfnSlqipg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3ugj-000LFx-0e@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:12:33 +0000

commit 1a36aac500bbc20853d0b3b85bc11e8dd91f6af5
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:12:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:12:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411829.1642235 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugu-00015v-Iv; Tue, 08 Sep 2026 12:12:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411829.1642235; Tue, 08 Sep 2026 12:12:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ugu-00015n-GT; Tue, 08 Sep 2026 12:12:44 +0000
Received: by outflank-mailman (input) for mailman id 1411829;
 Tue, 08 Sep 2026 12:12:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ugt-00015f-Nh
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:12:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugt-004nKt-1E
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ugt-000MTE-2B
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=XpOhKREm25qnJmSb/3ocN7X0I8Eq3RmQEzY986I3hIo=; b=LMgAXFMyopVs8w0p+2fYfEfKTC
	knvdgxxTFR7c6+NIG/7a1W39+PyX+CL0AXI7rNyALr6M7O0dzrrvHNWLJ4VZc6wWrjWj7wy5+Sz+1
	SG5gg7QNxNpi4sc9ljix/qkdq2nK87UA3NNWYe2uvTujyLGK/uM3SE6ZROboHd95G4gQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3ugt-000MTE-2B@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:12:43 +0000

commit d9dbb246713e36bbef8860f8443304fc1600756e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:48:38 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index a2ca7e0e57..c4dec8b05c 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:12:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:12:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411830.1642240 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uh4-00017p-KO; Tue, 08 Sep 2026 12:12:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411830.1642240; Tue, 08 Sep 2026 12:12:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uh4-00017h-Hq; Tue, 08 Sep 2026 12:12:54 +0000
Received: by outflank-mailman (input) for mailman id 1411830;
 Tue, 08 Sep 2026 12:12:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uh3-00017b-QM
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:12:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uh3-004nL1-1U
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uh3-000NcB-2S
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:12:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2cOkykksdp+LKYIA/eZ0jttP4D8I9nSwuZax6WYFuHo=; b=KBkXMMtItZHqjEWpu+3fE231tM
	eOrpP7wdDnK6sKyGwD4ajL095TQKlZPWmIp0PPcuAKveYc84LRVANTDk+erO+1me3Rst2ZxI5yNx2
	SB7glQMgTszpaHeCEaeqZjLaMDyr3TdcU8cbeu0ApVRLGzGzSVj0TKW7S0uS8OZPg5wk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3uh3-000NcB-2S@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:12:53 +0000

commit e350834c3514f1a95bc92d3669a179fbb4f2a394
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 3a7976729b..41f2d0c7e1 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:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:13:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:13:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411831.1642244 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhE-0001AJ-N1; Tue, 08 Sep 2026 12:13:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411831.1642244; Tue, 08 Sep 2026 12:13:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhE-0001AB-KR; Tue, 08 Sep 2026 12:13:04 +0000
Received: by outflank-mailman (input) for mailman id 1411831;
 Tue, 08 Sep 2026 12:13:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uhD-0001A3-TL
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:13:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhD-004nLI-1m
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhD-000Ofk-2j
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=NlGkgT4uHSEiOaMIvLGRt90kgFrKHwcw9tgDs1MimEs=; b=ibF9SNxol6iD9+p1PuvUoJVKna
	amxZetK5Eikey+7snZJ9DLEzPSHcWBnaHhk9uTXFyqOs5+61mtEn3es/ejt89JerL303IyOS72C07
	56UHUjX45QBk0pRVR1HLbIUM2IjfZfK4tnq7t0sroUlcU3WlIaFTuiZwEM8lrBMQOess=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3uhD-000Ofk-2j@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:13:03 +0000

commit 391bc11a86804661c8288d5a82c9c1dfcb4ea136
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 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 76a1bf1b11..6c1ea6aae2 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 a7b3b04a4d..c4a8f8bc76 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 b968f47b87..58410a367a 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
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:13:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:13:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411832.1642248 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhO-0001CW-Oe; Tue, 08 Sep 2026 12:13:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411832.1642248; Tue, 08 Sep 2026 12:13:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhO-0001CP-Lv; Tue, 08 Sep 2026 12:13:14 +0000
Received: by outflank-mailman (input) for mailman id 1411832;
 Tue, 08 Sep 2026 12:13:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uhN-0001C0-WF
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:13:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhN-004nLh-24
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhN-000PcF-31
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PsRJ1CBuobxESIeoLB2hRbfpyjLcNFsz2B/aQ1qnMxo=; b=DWwesXj+OiYkfY2ehQA+ACPBI9
	0il1vSdnUn93jQwT/A5KSfj6jM+AU8rL78rbcbuNsmUFSUbugne//MtN0/Mc0joXGgka/E2ngGCRn
	PfHKGmSdXJSPPGsk0db2Bk//COVptqUII++K56ZnkFkmjbzWKVBKkxWwIxkQaRwRPdsM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3uhN-000PcF-31@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:13:13 +0000

commit b414b465a6e63caeeb5371f345b36c04adb92c9f
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:13:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:13:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411833.1642251 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhY-0001EX-Q4; Tue, 08 Sep 2026 12:13:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411833.1642251; Tue, 08 Sep 2026 12:13:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhY-0001EP-NZ; Tue, 08 Sep 2026 12:13:24 +0000
Received: by outflank-mailman (input) for mailman id 1411833;
 Tue, 08 Sep 2026 12:13:24 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uhY-0001EH-2r
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:13:24 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhX-004nLq-2M
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhY-000QeQ-05
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=l9A0p9VmOuNwZt6W9gSVN2Hq8ES3XE73uro0rEpXkbs=; b=Qx9F+YlgOY/fUoO/2nrWhAzUw3
	4jotGZ7blZNC23WjB0ywOfw1OVhOLjBit89JEi6oul0YSbgzX0Ow96DEHjbrSgF/+0c1piMx4klUe
	SoZJC6GkWAKY/KuCkEe/hvVH6rtbDMd5pCbgoTdssAepERSMLKUoJsOvcNjBl9fBak9I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3uhY-000QeQ-05@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:13:24 +0000

commit 6714207b3979b9c513ae1b99df0a3ae67d91bc47
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:13:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:13:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411834.1642255 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhj-0001GZ-RS; Tue, 08 Sep 2026 12:13:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411834.1642255; Tue, 08 Sep 2026 12:13:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uhj-0001GR-Oy; Tue, 08 Sep 2026 12:13:35 +0000
Received: by outflank-mailman (input) for mailman id 1411834;
 Tue, 08 Sep 2026 12:13:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uhi-0001GJ-IL
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:13:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhi-004nLy-0g
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhi-000RkS-1e
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=kqn2sqx34Th4c1oq6e/rm0XRtx218iKuA3PqFvWyu7A=; b=BpFCYukjPj7chNN9l9Bsul93sR
	pdranKdH/h7sg8mZWNfrHrgUXzlY6gQUE7IXTAUp2zTCpuMnSjq5Mr+MVTu9RhqjRZL2ZbccvyTkP
	WKNX0ddvCxOeWEnyCJ7Lm0CEvnrRJPvzl62S1Y4VeBbJynjyORjYMq/qZqFyNMG15Vpg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3uhi-000RkS-1e@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:13:34 +0000

commit b26451ec7187c9c2b8fcfb32ce854761f653fed5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:49:15 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 47de6953fd..b8afd0b4c6 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:13:45 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:13:45 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411835.1642260 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uht-0001K5-Sp; Tue, 08 Sep 2026 12:13:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411835.1642260; Tue, 08 Sep 2026 12:13:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uht-0001Jx-QH; Tue, 08 Sep 2026 12:13:45 +0000
Received: by outflank-mailman (input) for mailman id 1411835;
 Tue, 08 Sep 2026 12:13:44 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uhs-0001Jp-Kp
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:13:44 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhs-004nM4-0x
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uhs-000SjS-1u
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5q7UwOgVh3cFDf8uluGAsS9G/aQwsqu3b/rEvfoUPIo=; b=FzQ8Jl8An7pW6mTHJHkZ5GoioP
	kdc5iEBZG2PGDOZtclKsPdjh8byGsKHMUJ8fotbW5IB/NW2FkM1k48PMR9wUZ+DU7B1jMmiWxN30O
	d8gUJFMGl2r/+KyukgsUyk8H8thAXaYMnoR5JeLm1do+unGsIJ8xtKGfyUeW+p2lTiVM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3uhs-000SjS-1u@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:13:44 +0000

commit 1514f2808b8670a6d3a18175c939da23dcb6528b
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 660aff134f..841216f2ea 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -293,6 +293,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:13:55 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:13:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411836.1642264 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ui3-0001M4-UO; Tue, 08 Sep 2026 12:13:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411836.1642264; Tue, 08 Sep 2026 12:13:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ui3-0001Lw-Ri; Tue, 08 Sep 2026 12:13:55 +0000
Received: by outflank-mailman (input) for mailman id 1411836;
 Tue, 08 Sep 2026 12:13:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ui2-0001Lq-NX
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:13:54 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ui2-004nO9-1D
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ui2-000Tl3-2B
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:13:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=8pRNX9qYhKXgVyOXJN+xDuCyraq9KMEdUuHEhLb+Tr4=; b=K/8AX6vTzlzoXhHw8JqCDGnbZB
	lcltTsjZyk0FXhEOclK5O/vpD0OliMN03KuI8h2F7yfunjG4XeMjMgNN9Woye893/xApYx5CsneGr
	+SiP7qjm30/fyNCV9QRrvNskjlkv6Q7H/3Atax/kPoLUIgU2e3mr1MWn2Kd0qqUMhRNc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3ui2-000Tl3-2B@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:13:54 +0000

commit bd0a1cf02051f0347ac8045ab7d091d0cb389e99
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 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 7a00bf95dd..54d2d60fcc 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -163,8 +163,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) )
@@ -176,15 +174,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
@@ -284,13 +273,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);
             }
 
@@ -305,9 +287,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 0a0ebc1598..2682fff9cc 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1068,15 +1068,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)) )
     {
@@ -1101,9 +1103,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.
@@ -1357,6 +1356,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2040,7 +2046,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;
 
@@ -2069,13 +2075,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 )
@@ -2084,9 +2093,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));
 
@@ -2999,9 +3005,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 16f733281a..d128541e2c 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -202,8 +202,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
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:14:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:14:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411837.1642268 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uiE-0001Od-16; Tue, 08 Sep 2026 12:14:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411837.1642268; Tue, 08 Sep 2026 12:14:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uiD-0001OR-Ub; Tue, 08 Sep 2026 12:14:05 +0000
Received: by outflank-mailman (input) for mailman id 1411837;
 Tue, 08 Sep 2026 12:14:04 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uiC-0001OJ-Q5
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:14:04 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uiC-004nOO-1T
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uiC-000Ut3-2S
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=r9KzKYV7efEuIMPqlPzCD1TYpQoUfV8HjwdclYiSjXQ=; b=l00w7sjlIYlMwoydGuz9ZwbWM2
	9x9jyEfhgMQYZ410AGsCKhVjgB5CjABWsS2iT6eCs3XHUcJpNYlNKtXVVdN0bgNKgNbPyiI9KT/on
	oxsdgd+p8Kn4oVap009oCRZGyeaIaCC+75KVAlqvKM2Oazj+SiHMlM7dl6V+QFJ7jozE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3uiC-000Ut3-2S@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:14:04 +0000

commit d40ecc79501d2cb3ea0d6e883891b4509998d569
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:14:16 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:14:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411838.1642271 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uiO-0001Qq-24; Tue, 08 Sep 2026 12:14:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411838.1642271; Tue, 08 Sep 2026 12:14:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uiN-0001Qi-Vx; Tue, 08 Sep 2026 12:14:15 +0000
Received: by outflank-mailman (input) for mailman id 1411838;
 Tue, 08 Sep 2026 12:14:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uiM-0001Qc-SY
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:14:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uiM-004nOl-1i
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uiM-000VsC-2h
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=7K9bgULlGQQaRV4RQigsyIXXAXKKCW5Qww7k9Vbw+E8=; b=bvmsp8FzLqVo1an/WVcAHTrI0v
	cxpfd+arobqkPuzt6Uy5uyZ0jS/A1BCQhOVOzdV4Jw6+Or+fUN8EKmsYp8om18IiOsCyFO+EuuXJr
	qQUzqn7aQis4yEX8+Q3WaDYOfp3OYAblyPVtJ4udKNX43Pdg3bv5YLNNG9zC4VeWPsBg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3uiM-000VsC-2h@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:14:14 +0000

commit 08daadcf1f219e36639711d9e28b6a534f069e6b
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:14:26 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:14:26 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411839.1642275 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uiY-0001Ss-3W; Tue, 08 Sep 2026 12:14:26 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411839.1642275; Tue, 08 Sep 2026 12:14:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uiY-0001Sk-10; Tue, 08 Sep 2026 12:14:26 +0000
Received: by outflank-mailman (input) for mailman id 1411839;
 Tue, 08 Sep 2026 12:14:25 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uiX-0001Sc-BL
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:14:25 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uiX-004nOu-00
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uiX-000WsX-0y
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0SS/L2bBRdgozFi3iZHLqn4BJuI3dnfMAqVoaCfgJAI=; b=bHxHgyPB6Q3bfmiArJI3o9Sr0k
	WmaN/0m54xElnJH3sVb+1mCCl8fxImd5jZH16RKpjEKcHfreF2csccrlqyYc6I6L9sBVH0hNjyroh
	+K0tplSG4Nkyu5ypiTBuQR1nEdzJA/S44dvxuSQfhyIFL2gMSDosXbZCxI5HW3Mfl7+M=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.19] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3uiX-000WsX-0y@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:14:25 +0000

commit 5dd29d6c944359d6debca3f4be59d280b5df4a66
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:49:59 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 47de6953fd..b8afd0b4c6 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:14:37 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:14:37 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411840.1642280 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uij-0001Up-4s; Tue, 08 Sep 2026 12:14:37 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411840.1642280; Tue, 08 Sep 2026 12:14:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uij-0001Uh-2K; Tue, 08 Sep 2026 12:14:37 +0000
Received: by outflank-mailman (input) for mailman id 1411840;
 Tue, 08 Sep 2026 12:14:35 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uih-0001UZ-EF
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:14:35 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uih-004nP6-0H
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uih-000Y01-1F
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eId8DbZ75D/YqLTJlJ+sptp/mkcu8+qKqJ+ax7xajiU=; b=ypSYSPJRL0ILDS2+c47l2XKIra
	meXTGXnQHtgfWKFf2FzvRpFdJAVyTfXA7tlGWyfmzvZPRo4yqSsMtT+ketoD40M269WFDYvP7Lid7
	IoMAGEj+HfGVUCs1o0GiOxN9Z5O0Gigk4b3A1m1LbMiulxuOcMLB5N9c3iZuqUzwrrW4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.19] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3uih-000Y01-1F@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:14:35 +0000

commit aabdb184bbf9bef927f1d4786332d3d25e95c7c8
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 4dde6a7b4a..a494bf68b1 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -293,6 +293,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:14:47 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:14:47 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411841.1642284 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uit-0001Wp-6K; Tue, 08 Sep 2026 12:14:47 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411841.1642284; Tue, 08 Sep 2026 12:14:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uit-0001Wh-3f; Tue, 08 Sep 2026 12:14:47 +0000
Received: by outflank-mailman (input) for mailman id 1411841;
 Tue, 08 Sep 2026 12:14:45 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uir-0001WZ-Gw
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:14:45 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uir-004nPE-0Y
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:45 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uir-000Z14-1W
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:45 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=D+wqRr6WRMbyrCyxn1/O4jZi5Z14cj0Cn/Wts8ja89I=; b=OutEnnHElx3tosXzWfc3xdfthR
	HH5Pdwh3MTBCN0RqDG6FL6zswy7CxgoEUS7EG5XSBV+vU3ovS16BLM0eXwLPUxFmqPukH9wziTIRO
	vTLhL0ALTZhZuirdAtfGHYNWTKI1obY5MJJgiURqwQrIRLPGqMkGsr9juFJEOrP21IHo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.19] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3uir-000Z14-1W@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:14:45 +0000

commit 6dd278418cf2e3907f7a6770363ff2ed312b0e03
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 xen/common/memory.c     | 21 ---------------------
 xen/common/page_alloc.c | 22 +++++++++++++---------
 xen/include/xen/mm.h    |  2 --
 3 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 723ab3c0da..e65d3ce3b0 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -161,8 +161,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) )
@@ -174,15 +172,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
@@ -282,13 +271,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);
             }
 
@@ -303,9 +285,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 bbb8578459..7bd565cd27 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1038,15 +1038,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)) )
     {
@@ -1071,9 +1073,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.
@@ -1320,6 +1319,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2796,9 +2802,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 7561297a75..cc7852662a 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -200,8 +200,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
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:14:57 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:14:57 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411842.1642288 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uj3-0001Yp-7c; Tue, 08 Sep 2026 12:14:57 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411842.1642288; Tue, 08 Sep 2026 12:14:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uj3-0001Yh-50; Tue, 08 Sep 2026 12:14:57 +0000
Received: by outflank-mailman (input) for mailman id 1411842;
 Tue, 08 Sep 2026 12:14:55 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uj1-0001YW-JX
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:14:55 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uj1-004nPI-0o
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:55 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uj1-000aHS-1m
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:14:55 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ZhoLXbzBOs3fnKlhEqSZIreoeN1oE9hrbKFVFoZoH7o=; b=ayTZ61/P7IBIqP8P7HviZyX2vU
	XFN0nt9ITzEr5KMUhnz1UbVwlQZMXijjbKtQEoiCTly0qTznEE0waHVU7XfcYNcSzLAyqLvbFATlw
	1i5pJ5A5e43gHyN89VgCvBLWR3ACPV5Czn9Rh62p2ptBdd4tbmda5/78kU/lkTTddpNM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.19] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3uj1-000aHS-1m@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:14:55 +0000

commit 160e04b0bec78a83607709bce72e60cadae216d8
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:15:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:15:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411843.1642292 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujD-0001bl-AD; Tue, 08 Sep 2026 12:15:07 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411843.1642292; Tue, 08 Sep 2026 12:15:07 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujD-0001bb-7X; Tue, 08 Sep 2026 12:15:07 +0000
Received: by outflank-mailman (input) for mailman id 1411843;
 Tue, 08 Sep 2026 12:15:05 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ujB-0001b4-M5
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:15:05 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujB-004nPk-14
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:05 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujB-000bT3-23
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:05 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=uq11obXZ/xOJgoij84Wxl7X2GU4UViOTrnJul6vBq2A=; b=xGGZ0OJ/8Z4LiFNdTvg+bnV+VB
	AUtDkM8CAZ9bYmbfdoftjapXdN+BJap3Ndda26ilg1JRt7WqX0plSd5y8Wtzn+ILuHJJwDGBCM0Kx
	ajcdGHkMnGLitVjg1XbjKU9Nz3OEcegxzLy+HvAzU9Umskn63Re1Q9lf19i7Q7ULHFOU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.19] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3ujB-000bT3-23@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:15:05 +0000

commit 3f22c5d1317a2c3eea143dd3962c5863dfe3967a
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:15:17 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:15:17 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411849.1642296 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujN-0001e2-Be; Tue, 08 Sep 2026 12:15:17 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411849.1642296; Tue, 08 Sep 2026 12:15:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujN-0001dv-8s; Tue, 08 Sep 2026 12:15:17 +0000
Received: by outflank-mailman (input) for mailman id 1411849;
 Tue, 08 Sep 2026 12:15:16 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ujM-0001dp-4u
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:15:16 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujL-004nQ4-2a
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:16 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujM-000cc4-0L
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:16 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=uqa7Y00iNE6de25wkUqplrcFHQV5EVc9FVIpkZFLRLE=; b=KHt0TmbExNJeYii7Z/c/gTnBYQ
	LyHQGHwv5xcx4K/7/uv53jnYRn8QOw0Ba9drvdMIsJiTta5c3AskLMpKoqFHkcNRQnRzhaDt2Gs3m
	Ymq1ED1XZdiLRMY072riuW4xp62SV3OuciaRk/CWR9nasEJp+siIcDxGUz2Zgjd+kLzE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.18] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3ujM-000cc4-0L@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:15:16 +0000

commit a5817d143d4c452a420f6691fe167ef2deae98c8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:50:35 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 6813107648..94e42e1e0f 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:15:27 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:15:27 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411850.1642299 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujX-0001g5-D8; Tue, 08 Sep 2026 12:15:27 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411850.1642299; Tue, 08 Sep 2026 12:15:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujX-0001fy-Ac; Tue, 08 Sep 2026 12:15:27 +0000
Received: by outflank-mailman (input) for mailman id 1411850;
 Tue, 08 Sep 2026 12:15:26 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ujW-0001fq-7b
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:15:26 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujV-004nQA-2q
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:26 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujW-000dVn-0a
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:26 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=pVlDWfAcxCtJN/kutneqnjGDwjgiKsf2PBYhgyGVR7o=; b=qmGrvVE7kMi8TNn0Vbsj4LDE2y
	QMEJgSTij+ZwT+pWul6EoE+oqvIvB7tEmpupUujWgFrwjzUJjszDMntY7yqf91nMbAeyi0YIgIrCk
	ubgOM7BxmkyZU/PU0J3B7mC0Vf+wUU+fktE2rTtNqZv9ZwexE86p+cKMdl24EFp1/fQE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.18] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3ujW-000dVn-0a@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:15:26 +0000

commit f951c3a07c269d58b1fd4fec19609b1f9c60bb5d
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 af443555cc..97d8f2cbc4 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -261,6 +261,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:15:37 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:15:37 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411851.1642304 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujh-0001i3-Eg; Tue, 08 Sep 2026 12:15:37 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411851.1642304; Tue, 08 Sep 2026 12:15:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujh-0001hv-C8; Tue, 08 Sep 2026 12:15:37 +0000
Received: by outflank-mailman (input) for mailman id 1411851;
 Tue, 08 Sep 2026 12:15:36 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ujg-0001hp-A7
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:15:36 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujf-004nQE-36
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:36 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujg-000eRr-0r
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:36 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=lHCg+xN0VNGulyTmm5Y9hoAzbnMct+N4yTvahNzJXIc=; b=nqiJHgcElHb1xEtzC+CYIPcXfB
	3fRWoqnS1oA4eLCtFfoTqgAOBjucXvy0d5WUSPFj90bpdhvPYeEdgoMaU0SFFc6VD6I/qSSmFNPWp
	3RHuVkubo+ASHQls0+/lgzjtVgEdpy3NQvEQxPZpRUs2nFZTpFu/kI5WwA+l1vCyc0As=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.18] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3ujg-000eRr-0r@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:15:36 +0000

commit 4351ad878172c61a0603b10389d7d955b0d79d8b
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 xen/common/memory.c     | 21 ---------------------
 xen/common/page_alloc.c | 22 +++++++++++++---------
 xen/include/xen/mm.h    |  2 --
 3 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 5251ab3437..640f3a70ab 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -161,8 +161,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) )
@@ -174,15 +172,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
@@ -282,13 +271,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);
             }
 
@@ -303,9 +285,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 9b5df74fdd..5e88249f50 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1030,9 +1030,7 @@ 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);
 
         /* Initialise fields which have other uses for free pages. */
         pg[i].u.inuse.type_info = PGT_TYPE_INFO_INITIALIZER;
@@ -1042,6 +1040,10 @@ static struct page_info *alloc_heap_pages(
 
     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)) )
     {
@@ -1066,9 +1068,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.
@@ -1315,6 +1314,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2791,9 +2797,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 8bc5f4249d..1fef542f6f 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -197,8 +197,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
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:15:47 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:15:47 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411852.1642308 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujr-0001k2-GD; Tue, 08 Sep 2026 12:15:47 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411852.1642308; Tue, 08 Sep 2026 12:15:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ujr-0001jv-DR; Tue, 08 Sep 2026 12:15:47 +0000
Received: by outflank-mailman (input) for mailman id 1411852;
 Tue, 08 Sep 2026 12:15:46 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ujq-0001jn-EP
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:15:46 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujq-004nQO-08
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:46 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ujq-000fTA-16
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:46 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=C2qxxw5poSZc5w+wLFCvamEdEbj+kpfnXv4LDQqDFIk=; b=JtcLqYVBxSUfblnb71Rr4BXDxv
	ebRQaMbYVzy74/QhyFOi0tqEGOimsOHiBeO0l8tmFuvq8lIYuZehxrg+pEFTL1xwt6maabsBPwDou
	8bK59XewZNh+6oc95JWFuMYcHeF/yxOY3UJcnrSu262jKZNzeXB9C8W7vL5ja9ulrwys=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.18] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3ujq-000fTA-16@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:15:46 +0000

commit 8db86bc4f759f6176f3d9298dc36e487c49e2229
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 432d66321c..a1d1f08f84 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:15:57 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:15:57 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411853.1642314 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uk1-0001ly-It; Tue, 08 Sep 2026 12:15:57 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411853.1642314; Tue, 08 Sep 2026 12:15:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3uk1-0001lq-Et; Tue, 08 Sep 2026 12:15:57 +0000
Received: by outflank-mailman (input) for mailman id 1411853;
 Tue, 08 Sep 2026 12:15:56 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3uk0-0001lk-FB
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:15:56 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uk0-004nQc-0N
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:56 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uk0-000gPt-1M
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:15:56 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+l4iJmHYKKYzPNYA4RiHLD7oWqtB/somsVuV3bu9HzY=; b=Fg847b9LVTRxkQ2IQmn6/LZBxj
	xRSO2P5oduvQRhQhFYSzz0BZzRBapqnF2ZZ/K9fIC+GI/CJvXPwpec2/jPl4hgiccK/KY7IWP9w0s
	VaIuyfxmRIIGnzQ7IloIWCHMVGXsjyLnwHXTIlhi3OwL3g5VeNAtuVeZxjh8It7rENfk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.18] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3uk0-000gPt-1M@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:15:56 +0000

commit db29bf7a77831633269293a26e9eeea4cc0d6049
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 a1d1f08f84..e20c9cec0d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:16:11 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:16:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411854.1642316 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukC-0001oW-Ky; Tue, 08 Sep 2026 12:16:08 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411854.1642316; Tue, 08 Sep 2026 12:16:08 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukC-0001oM-I3; Tue, 08 Sep 2026 12:16:08 +0000
Received: by outflank-mailman (input) for mailman id 1411854;
 Tue, 08 Sep 2026 12:16:07 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ukB-0001oE-0l
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:16:07 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukA-004nQr-1t
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:06 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukA-000hZw-2p
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:06 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=gUKR49sWbeUxAxZ7LsIYs3CvAkIqC5TLlVe2g2Gpy3c=; b=tfCoeWaXYR7acC4JvRzfoVHs3o
	WEtQ7c2ps4Q/AQgfguPl/HmnfmVkBUuBWC32KVJP5KitSXa5Uj4/cfqUCqdSF7YNC6KbOYARbEHYY
	WU+zfwjwfIINHjbMMQXM9+zgLl7Xoa1Mm63wGm89TVL2+q5m3qKkT8NAjI5hoZFbPgL0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.17] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3ukA-000hZw-2p@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:16:06 +0000

commit 439228f517441fe0187a4ff62be7ae766891dc1c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:51:04 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index a16e0e5344..4c8a3f8a39 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:16:18 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:16:18 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411855.1642319 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukM-0001qe-Lx; Tue, 08 Sep 2026 12:16:18 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411855.1642319; Tue, 08 Sep 2026 12:16:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukM-0001qV-JM; Tue, 08 Sep 2026 12:16:18 +0000
Received: by outflank-mailman (input) for mailman id 1411855;
 Tue, 08 Sep 2026 12:16:17 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ukL-0001qO-0Y
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:16:17 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukK-004nRE-29
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:16 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukK-000iTZ-37
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:16 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IK28NZp17fSCyqFiM7jgiIv7PNvFMeNxXEQ18ZoxWhk=; b=E97qspqS8jY1OtYSEgTMlZ9naY
	aHJmWIM/MvIj9a2cvspTHfqeMnhzFwtfQEqm8TOW00GKzvi4HIw6Pp+rbgbTcvNvS7PZla7fSg87R
	AfG3AWatYM4np/H9RIeBxN7WK0eL6M3iEop7WzqcOBjkNblWv6/I0bOiZeyYeTh9AsD4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.17] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3ukK-000iTZ-37@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:16:16 +0000

commit e275898f007bcc7377bf698303b3f42575f6ebfb
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 464c43d035..610696d971 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -249,6 +249,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:16:28 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:16:28 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411856.1642324 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukW-0001sd-NL; Tue, 08 Sep 2026 12:16:28 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411856.1642324; Tue, 08 Sep 2026 12:16:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukW-0001sV-Ke; Tue, 08 Sep 2026 12:16:28 +0000
Received: by outflank-mailman (input) for mailman id 1411856;
 Tue, 08 Sep 2026 12:16:27 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ukV-0001sM-3k
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:16:27 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukU-004nRM-2S
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:27 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukV-000jLc-0B
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:27 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=kcbSEQmN23KuctDCG/+eANPSp5wFQ33145p09jGkvWI=; b=Kou3nBosAujBt++9vs7hyZtGu4
	eoHygfz+RZG1LcIiRJonsuV1Df1HsuEWoqoARSXD0jqAStROcAuuTDuphHBgAjdm7wRppwWGBfo9l
	Hd02G9q9hRfh0WeEAXoPzA8ofHUUe8nzlpJG6AXDmTVA96a+dcoOU6sl8c+sjxPpyRAM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.17] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3ukV-000jLc-0B@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:16:27 +0000

commit d3b6291e689ca48e038fb309ed6de9e30f056e8e
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 xen/common/memory.c     | 21 ---------------------
 xen/common/page_alloc.c | 22 +++++++++++++---------
 xen/include/xen/mm.h    |  2 --
 3 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index d063f649a1..e5983997f0 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -160,8 +160,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) )
@@ -173,15 +171,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
@@ -281,13 +270,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);
             }
 
@@ -302,9 +284,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 62afb07bc6..dc0926019a 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1023,9 +1023,7 @@ 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);
 
         /* Initialise fields which have other uses for free pages. */
         pg[i].u.inuse.type_info = PGT_TYPE_INFO_INITIALIZER;
@@ -1035,6 +1033,10 @@ static struct page_info *alloc_heap_pages(
 
     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)) )
     {
@@ -1059,9 +1061,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.
@@ -1300,6 +1299,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2776,9 +2782,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 211685a5d2..baf116007a 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -182,8 +182,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
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:16:38 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:16:38 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411857.1642328 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukg-0001ua-Oq; Tue, 08 Sep 2026 12:16:38 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411857.1642328; Tue, 08 Sep 2026 12:16:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukg-0001uS-M5; Tue, 08 Sep 2026 12:16:38 +0000
Received: by outflank-mailman (input) for mailman id 1411857;
 Tue, 08 Sep 2026 12:16:37 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ukf-0001uL-6F
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:16:37 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uke-004nRV-2i
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:37 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukf-000kKQ-0S
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:37 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ia+6xQUocEgMyzsJKMM/Q0Hn6iP+IggaoVexzG+FCYI=; b=EfyVRd2HsqJ44IH7Y4mJTn6V0r
	qK1Az9R6154Hh7YqIQK1sUVSIIeI+kyj27FwOWeMNuuYttgzxhOK9h8UQxLLueO+v6qwnSHVdmj4x
	Tj+9M2fNw790kMYXa5i8Pe8baYQOoQLGAq+4dBmqbaDS2N1Xzf1xEAH6TKYhLxZHxyDE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.17] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3ukf-000kKQ-0S@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:16:37 +0000

commit 7499d14f6e7fda900d8ad00f6224b2efe226ac20
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index ba5c9cb571..029802bd15 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 02bd0f7d80..33161da5eb 100644
--- a/tools/ocaml/xenstored/process.ml
+++ b/tools/ocaml/xenstored/process.ml
@@ -333,6 +333,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)
@@ -718,9 +725,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;
@@ -743,7 +748,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 (
@@ -758,8 +763,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;
 	)
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 12:16:48 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 12:16:48 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411859.1642332 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukq-0001wh-Q3; Tue, 08 Sep 2026 12:16:48 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411859.1642332; Tue, 08 Sep 2026 12:16:48 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3ukq-0001wZ-NM; Tue, 08 Sep 2026 12:16:48 +0000
Received: by outflank-mailman (input) for mailman id 1411859;
 Tue, 08 Sep 2026 12:16:47 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3ukp-0001wP-92
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 12:16:47 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3uko-004nRb-30
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:47 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3ukp-000lNf-0i
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 12:16:47 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2fFdviisQZ41hWJnhDNhvbfe/GeYL+IGxS91+wVxnWE=; b=JYkSBCq236ioc1J9qQ6VB/IqbZ
	mc90GQP3X9ZN4MgQVm6rxpwWjJmANzBbwu8bxM9bE65RaTxeK3nU3jO+6X4VYUzo0zbCyzDpUHkMQ
	4hwVncYzdNO0eFWuq3KUw0m9ur/PZqTrcjwSXrMx/8ZRW6kr61jPJ73P0+/UV/LpbqGo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.17] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3ukp-000lNf-0i@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 12:16:47 +0000

commit fae7e6082a58812fb03c02283edbb000ab93e7c6
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index 54f7f76516..a91caabec6 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 33161da5eb..b2ee4d0adf 100644
--- a/tools/ocaml/xenstored/process.ml
+++ b/tools/ocaml/xenstored/process.ml
@@ -328,15 +328,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
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:00:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:00:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411974.1642426 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vQi-0004hm-4v; Tue, 08 Sep 2026 13:00:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411974.1642426; Tue, 08 Sep 2026 13:00:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vQi-0004hU-1z; Tue, 08 Sep 2026 13:00:04 +0000
Received: by outflank-mailman (input) for mailman id 1411974;
 Tue, 08 Sep 2026 13:00:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vQg-0004FH-6o
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:00:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vQf-004oJ7-1z
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vQf-004tkg-2r
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ZhBJgbezs3VUy9ZJNZB3PKu+eayRh1WA2xuP3FhPJFc=; b=zSwK8vF9yxsYfsODVcZOfK93AP
	pmAiZL9MwpX0LFYGtfbnG3kA3CcZxVZWygJ87TlC5xyy/Jcehilk6GezEc+83gqxousovv4tvHH7B
	mWGvA5sypQwVI3c2zNp/foEzgasVLB9Nql5nZmmUkvsZjGaxI7esd6vBA6dc1zl6pYhw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3vQf-004tkg-2r@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:00:01 +0000

commit 328a1461430f82d5f0318511e71b7143cdbca872
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:36:26 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    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>
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index b73bb55055..32632a3b15 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:00:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:00:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411975.1642430 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vQr-00059w-7c; Tue, 08 Sep 2026 13:00:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411975.1642430; Tue, 08 Sep 2026 13:00:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vQr-00059n-53; Tue, 08 Sep 2026 13:00:13 +0000
Received: by outflank-mailman (input) for mailman id 1411975;
 Tue, 08 Sep 2026 13:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vQq-00059R-27
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vQp-004oJU-2H
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vQq-004ueM-00
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PlpgJqHB1Nw5berGFsl31N3z2h43nIGPJIloO55AqUM=; b=gWVQMojAdl6LxU1Rradwneb5uO
	2UfQRyCjwLfgDip1r2AYB31fD1b7mf1U0KjRCilq+98tpcuILTMdkrQFYPp2D4Xd3VzUH3mV/zwUd
	C7+9wEpdWtRDM9lch7XvQwWlXMxA5md9RmgrRMb2h0gnlb4BN+Wv6y5BSxmBUbKAQKns=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3vQq-004ueM-00@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:00:12 +0000

commit 62aff073266bd83fa2d675913d913134abd3c82b
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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 2efb1d4f08..c09ea002ec 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:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:00:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:00:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411976.1642435 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vR1-0005CG-9R; Tue, 08 Sep 2026 13:00:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411976.1642435; Tue, 08 Sep 2026 13:00:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vR1-0005C8-6S; Tue, 08 Sep 2026 13:00:23 +0000
Received: by outflank-mailman (input) for mailman id 1411976;
 Tue, 08 Sep 2026 13:00:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vR0-0005C2-5b
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:00:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vQz-004oJa-2d
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vR0-004vWQ-0J
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=yJUZDyA78kaF0uEDj2cc71lWR88HSgp4yTSW17G2WJs=; b=IfmQZu/pshWU06z8sFB3rjWHXa
	+mjDocw/pLDXUgdiXZ3J/b1MI5iF5iwcA9yrkS27mArNtZPGTF9GY7cvNlcxv+M+WvAp7vvKFfN7P
	bQWkBYFxvEqjiEbc78wyWhDrhGZr/fxsQDrbqwVUanf2lUuSVCzz1us5cfGl0DL9jJ5A=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3vR0-004vWQ-0J@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:00:22 +0000

commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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 9443e35a7f..4afa2271b7 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -233,8 +233,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) )
@@ -246,15 +244,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
@@ -397,13 +386,6 @@ static void populate_physmap(struct memop_args *a)
                     }
                 }
 
-                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);
             }
 
@@ -418,9 +400,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 1e47f38721..62ac89b824 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1101,15 +1101,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)) )
     {
@@ -1145,9 +1147,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.
@@ -1409,6 +1408,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
@@ -2077,7 +2083,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;
 
@@ -2106,13 +2112,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 )
@@ -2121,9 +2130,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));
 
@@ -3041,9 +3047,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 fd8b0ba3f5..153c57f5dd 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -222,8 +222,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
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:00:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:00:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411977.1642439 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vRB-0005EK-Ak; Tue, 08 Sep 2026 13:00:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411977.1642439; Tue, 08 Sep 2026 13:00:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vRB-0005EC-7m; Tue, 08 Sep 2026 13:00:33 +0000
Received: by outflank-mailman (input) for mailman id 1411977;
 Tue, 08 Sep 2026 13:00:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vRA-0005E3-8j
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:00:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vR9-004oJg-2x
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vRA-004wRo-0d
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zTHtSGl1pJUQK7T2sxf/XVQKJV2e0OVRR3Bb8ZC0GIM=; b=D+92ogTFxTLkUBo7+gZN4d6o/n
	g9+kH8qy5zNJk5HrpvHzix8qViQ5sTWOAvh0kAiKoR3e5LL/cAV1BtNTFohY7JqMHca2Qhw18IjdJ
	XOdpqQKR67WVukCsoy5+b1Najc26CMdStPQxZgSKcgCiwqDaF8YCFfGBdp+UEWG3FP38=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3vRA-004wRo-0d@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:00:32 +0000

commit 9c5a46b12066da7311a8d43202abd78956ab0bfb
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    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>
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:00:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:00:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1411978.1642441 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vRL-0005GF-Be; Tue, 08 Sep 2026 13:00:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1411978.1642441; Tue, 08 Sep 2026 13:00:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vRL-0005G7-98; Tue, 08 Sep 2026 13:00:43 +0000
Received: by outflank-mailman (input) for mailman id 1411978;
 Tue, 08 Sep 2026 13:00:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vRK-0005G1-Ce
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:00:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vRK-004oJk-05
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vRK-004xKh-0y
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:00:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sdS3S7MRMI8ELCyrdGXAjzXWpUBtUh9NYLKgS5Bb4mY=; b=p80mRr0dU5aABRyIHUv47APfZB
	KGiErZhzTgYVXanrkyJ3rs78TybiJnA7rpO6J/ad/kVqktrhhQh8wEwd/0zbgkvNrrOY3O/zvgp1v
	SV4uoyaXtRPxGiq89V7d0mOSQNuDfaeNXkQCrztqr2pSH6nPLF/edkljDWxQR4YaFoJA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3vRK-004xKh-0y@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:00:42 +0000

commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 8 12:57:23 2026 +0100

    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>
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:22:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:22:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412041.1642510 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vlz-00032N-AW; Tue, 08 Sep 2026 13:22:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412041.1642510; Tue, 08 Sep 2026 13:22:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vlz-00032F-7Z; Tue, 08 Sep 2026 13:22:03 +0000
Received: by outflank-mailman (input) for mailman id 1412041;
 Tue, 08 Sep 2026 13:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vly-000328-3p
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vlx-004og6-0z
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vlx-006iqK-1r
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=LFwx/eXfhtmrrJemiuGBeMILUqd4/bIOs+/d5h0EUpA=; b=mRRaDPByjCywgWUB6J7+Lwm3Hm
	+Zk3pErzPehR6Ce8K56Qn+oTv8hNEkVU4bRgBmSiYcn3t5j4Av6XfmXPEeZTxzq1YOi+JJ+EcEyoP
	WcnzK3B3KeQU61/ZVaOKbvmH13KWGUqnM8TgXUX3WD+zOR6oMV4xFi+/1QFmnWDLK7ME=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.17] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3vlx-006iqK-1r@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:22:01 +0000

commit 439228f517441fe0187a4ff62be7ae766891dc1c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:51:04 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index a16e0e5344..4c8a3f8a39 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:22:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:22:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412042.1642514 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vm9-000345-CL; Tue, 08 Sep 2026 13:22:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412042.1642514; Tue, 08 Sep 2026 13:22:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vm9-00033x-8t; Tue, 08 Sep 2026 13:22:13 +0000
Received: by outflank-mailman (input) for mailman id 1412042;
 Tue, 08 Sep 2026 13:22:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vm7-00033n-OT
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:22:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vm7-004ogM-1I
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vm7-006jmM-2E
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/slzAf11q/LEvwduhbBmNRKPFLM/Kv9r2TDxpNAzIyk=; b=tVRtOHUjQ7pyBELw2JGTiR8Nn+
	VvrgdklS0pzvYmghiOfejwPKfT8P93j1etoxSHq8hwjih7EIgAUbKeHi7s1P0XIs6q9YhjCUV8ba+
	+HXBYWkITy7r1GVVT76nqDhsFYiSqYbIVu4oz/2ODFXzT00AYfj5l4IYLOhA6GIHnCPY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.17] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3vm7-006jmM-2E@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:22:11 +0000

commit e275898f007bcc7377bf698303b3f42575f6ebfb
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 464c43d035..610696d971 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -249,6 +249,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:22:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:22:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412044.1642516 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vmJ-00036s-EV; Tue, 08 Sep 2026 13:22:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412044.1642516; Tue, 08 Sep 2026 13:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vmJ-00036k-Bx; Tue, 08 Sep 2026 13:22:23 +0000
Received: by outflank-mailman (input) for mailman id 1412044;
 Tue, 08 Sep 2026 13:22:21 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vmH-00036a-Rq
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:22:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vmH-004ogk-1d
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vmH-006kbq-2Y
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=uDUpX71i7W/Ew418a/O58mMCkwXkEDziCrPcnAzjzoo=; b=ldq8/txLyrTSIKW/QD3LEnROJH
	s711lYr2qnzV4H1jpvNDfU4Fsdgoa+jtXVW3vbrcUeENZz8egDRj5JrRYlhk+/kgzBInuxSo6yG7f
	Dy78lqgxTubRbHJjNVBU3Rd9dI2uC89uRTNZ75sVmVLpxoFMrWb7sD91un+4b0xIjjl4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.17] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3vmH-006kbq-2Y@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:22:21 +0000

commit d3b6291e689ca48e038fb309ed6de9e30f056e8e
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 xen/common/memory.c     | 21 ---------------------
 xen/common/page_alloc.c | 22 +++++++++++++---------
 xen/include/xen/mm.h    |  2 --
 3 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index d063f649a1..e5983997f0 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -160,8 +160,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) )
@@ -173,15 +171,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
@@ -281,13 +270,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);
             }
 
@@ -302,9 +284,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 62afb07bc6..dc0926019a 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1023,9 +1023,7 @@ 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);
 
         /* Initialise fields which have other uses for free pages. */
         pg[i].u.inuse.type_info = PGT_TYPE_INFO_INITIALIZER;
@@ -1035,6 +1033,10 @@ static struct page_info *alloc_heap_pages(
 
     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)) )
     {
@@ -1059,9 +1061,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.
@@ -1300,6 +1299,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2776,9 +2782,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 211685a5d2..baf116007a 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -182,8 +182,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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:22:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:22:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412045.1642521 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vmT-00038s-Fv; Tue, 08 Sep 2026 13:22:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412045.1642521; Tue, 08 Sep 2026 13:22:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vmT-00038k-DJ; Tue, 08 Sep 2026 13:22:33 +0000
Received: by outflank-mailman (input) for mailman id 1412045;
 Tue, 08 Sep 2026 13:22:31 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vmR-00038e-UR
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:22:31 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vmR-004ogo-1u
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:31 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vmR-006lUX-2r
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:31 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qF69R6oZY1dWtNSyC1bq9+PpN8v1o5a1FcjpjUWydM0=; b=pnQdjKI5U6aRDdepDNugjF6YGc
	jaNLEsV5Ia4OjDpxPvgn9mVvUdeDfl/dlyBkL8FJthj0LUy7tTsj3YRh4JsacE+5xvW3TBziR5Zbm
	JKZCqt6qkXfxHpv6ZAMsVcBBL7ZaNIFjgJSSurvcjB/g20DoXNvt8Rlaas90QA084X8o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.17] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3vmR-006lUX-2r@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:22:31 +0000

commit 7499d14f6e7fda900d8ad00f6224b2efe226ac20
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index ba5c9cb571..029802bd15 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 02bd0f7d80..33161da5eb 100644
--- a/tools/ocaml/xenstored/process.ml
+++ b/tools/ocaml/xenstored/process.ml
@@ -333,6 +333,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)
@@ -718,9 +725,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;
@@ -743,7 +748,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 (
@@ -758,8 +763,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;
 	)
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:22:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:22:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412046.1642525 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vmd-0003Ar-HE; Tue, 08 Sep 2026 13:22:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412046.1642525; Tue, 08 Sep 2026 13:22:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3vmd-0003Ai-Eb; Tue, 08 Sep 2026 13:22:43 +0000
Received: by outflank-mailman (input) for mailman id 1412046;
 Tue, 08 Sep 2026 13:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3vmc-0003Aa-1L
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vmb-004ogs-2E
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3vmb-006mJ3-3A
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:22:41 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=oyJ4t13xrNmdzu39qi9rvA9rcbTt8zzPhyu8P0k2OL8=; b=Sus2dMc+atpZHITuj3pc/EWkA8
	Db/28FHUQvKGInr7XJfnrVBf6VEUV/+prujf01jQ6Ns9yQ6TQWT+4OTyWKM8474YTeg3CpnRaTIbZ
	CCIuX+nfdurI9nnZ9+hPkYYBLrhMb9ULQBneylv+AP9uHqNdn/wRfyVxgv2xtmwjgl8s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.17] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3vmb-006mJ3-3A@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:22:41 +0000

commit fae7e6082a58812fb03c02283edbb000ab93e7c6
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:51:38 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index 54f7f76516..a91caabec6 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 33161da5eb..b2ee4d0adf 100644
--- a/tools/ocaml/xenstored/process.ml
+++ b/tools/ocaml/xenstored/process.ml
@@ -328,15 +328,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
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:44:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:44:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412054.1642529 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7H-0005gW-Vb; Tue, 08 Sep 2026 13:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412054.1642529; Tue, 08 Sep 2026 13:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7H-0005gO-Sp; Tue, 08 Sep 2026 13:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1412054;
 Tue, 08 Sep 2026 13:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3w7G-0005gI-D5
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7F-004p4T-2R
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7G-008Vqd-06
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=h0GV5sQimdmBGNFVZmszhAbh2ASOwX5rzpt9ezLp4bU=; b=c8kdF49VsmAe3p9T/N/jnRq6PO
	fKSQik+LOYhtGOn/e81Ew8kHCaZumENf8tYv4tsHigGghfLng89Eyb7Jp1bnGaAB2zvmg0fwlM4kB
	1rR3L8uhTTeK10W0ZtHuvnMHG3+e6N0+eYCblgEmVcwVijrMbA7Tio8n0Nhg6dh5FluA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3w7G-008Vqd-06@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:44:02 +0000

commit cad43d95a2a3c95b3d75f56b8db3e08410757305
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:47:41 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index b73bb55055..32632a3b15 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:44:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:44:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412055.1642533 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7S-0005iM-0n; Tue, 08 Sep 2026 13:44:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412055.1642533; Tue, 08 Sep 2026 13:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7R-0005iE-UI; Tue, 08 Sep 2026 13:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1412055;
 Tue, 08 Sep 2026 13:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3w7Q-0005i5-6X
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7P-004p4X-2k
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7Q-008WvW-0R
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=FAbY+bEYHYR/P7Nyb4Df3Tg/EG2VIARsUS5I+n/Z17w=; b=FW4evfkWgxboLZzKz9LPRuUmkq
	ZICOKYyi3ulFxoAfLnDOjTGWu/hOEjoM85snF3uXlUK0+R5h4uea6lvVZTKIfI0gTd2cXmZwvN7M2
	7L/xxpYE5C66AOgtaBMBB6qYub6r6vzNWFgmTuE2+oYDSQMISNFoRfEpPvLKmKBKO2p8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3w7Q-008WvW-0R@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:44:12 +0000

commit 41f73fe55bad6269bc03e25bf878ab608017acee
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 2efb1d4f08..c09ea002ec 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:
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:44:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:44:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412057.1642546 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7c-0005x6-9O; Tue, 08 Sep 2026 13:44:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412057.1642546; Tue, 08 Sep 2026 13:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7c-0005ww-5x; Tue, 08 Sep 2026 13:44:24 +0000
Received: by outflank-mailman (input) for mailman id 1412057;
 Tue, 08 Sep 2026 13:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3w7a-0005pK-A7
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7Z-004p57-36
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7a-008Xl2-0l
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=HI4Vro1lBY9cncg6V0FuOR9IPqXuZHsRVKckLe58q/g=; b=b0M2zeZsT0gbbGgppZ4BZt90im
	VEGYm2c/E6+858ObGBtESftM2kUnCqMEFXr5WYtPHWKqt1EQHVdl22HFb4qMtiufH07yyfnZyJ0s6
	K0DrB0H04yYw/O1la94NLaCMk9NvvCNchhKM1drBHdHKIhhiDMBIITc3fG7JF6f48upI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3w7a-008Xl2-0l@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:44:22 +0000

commit 7c95e794d9124b0968e172fe9836f367053d9627
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 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 e245b160d4..ff2ed61fe2 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -232,8 +232,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) )
@@ -245,15 +243,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
@@ -396,13 +385,6 @@ static void populate_physmap(struct memop_args *a)
                     }
                 }
 
-                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);
             }
 
@@ -417,9 +399,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 40b0f73563..3f9f46dd58 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1099,15 +1099,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)) )
     {
@@ -1143,9 +1145,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.
@@ -1399,6 +1398,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
@@ -2066,7 +2072,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;
 
@@ -2095,13 +2101,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 )
@@ -2110,9 +2119,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));
 
@@ -3027,9 +3033,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 b80bec00c1..379a8e4cbe 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -222,8 +222,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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:44:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:44:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412058.1642550 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7m-00062C-BS; Tue, 08 Sep 2026 13:44:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412058.1642550; Tue, 08 Sep 2026 13:44:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7m-000624-8i; Tue, 08 Sep 2026 13:44:34 +0000
Received: by outflank-mailman (input) for mailman id 1412058;
 Tue, 08 Sep 2026 13:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3w7k-00061W-DQ
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7k-004p5G-09
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7k-008YaK-16
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=9IRVRYVsHPL2IpsOgfzoqZXheYN5yVEOdgdNo0bUB00=; b=U8Ibm3aymo3VT5QnrDREQtvb55
	LPVVXRTOTybTPF2TaVbH7S/yUv+MDGm7nqTpsUhn+4aRN/x6jCC8+VYWqRTMlWsCSzhHyDKVVhFZ4
	5Hk0bzq7OqTcc6cpxzXkGTolTZ80YUfeqWHwOqF1Pj/kwrKjFHibQsSSXEjzY4fQUoUA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3w7k-008YaK-16@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:44:32 +0000

commit 68e24b9c95e90879dc5cc9a242e62e5e5867b123
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 13:44:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 13:44:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412060.1642554 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7w-00066e-Cl; Tue, 08 Sep 2026 13:44:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412060.1642554; Tue, 08 Sep 2026 13:44:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3w7w-00066W-A3; Tue, 08 Sep 2026 13:44:44 +0000
Received: by outflank-mailman (input) for mailman id 1412060;
 Tue, 08 Sep 2026 13:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3w7u-00066A-G3
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 13:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7u-004p5M-0S
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3w7u-008ZNX-1N
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 13:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=inT+OvQuOzUNfjifuSLG0Q38KPxqJbT4sQTaLxpI2YY=; b=WQYJC9+IP+aqFcljrTcZ36ZuAR
	7iInV/BgK4z4/6R6M8b+r8oZKnTy5QLqzCDiiOoqWTIs2ftA20/284Z2hscQ2zAHfxY71Jd8vr3qY
	oyO1QrHa+YV63tWbaYSPUDt59EmRYkk0hpW39mvFR3oXy/ZoSrrP6X31RoL9aH5WKgJI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3w7u-008ZNX-1N@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 13:44:42 +0000

commit 1a36aac500bbc20853d0b3b85bc11e8dd91f6af5
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:17 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 14:33:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 14:33:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412131.1642612 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wsi-0007os-72; Tue, 08 Sep 2026 14:33:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412131.1642612; Tue, 08 Sep 2026 14:33:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wsi-0007oi-4L; Tue, 08 Sep 2026 14:33:04 +0000
Received: by outflank-mailman (input) for mailman id 1412131;
 Tue, 08 Sep 2026 14:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3wsg-0007oY-Iy
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 14:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wsf-004qES-2W
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wsg-00CIwb-0E
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=hFgNrlkoGbcOYuGj5Zti7zARrcbnyNQ6PwMs9E5jcBY=; b=gQn0TEgVYFfxdnPA3IoA5TuxhJ
	owFqpkI0Izw5Q/9Lrlz9NTrmR5Fzg9RE+ofF+sPqWAFMyOTPbvdjFI2dMNMeRBSFGGn5wCArFfnKI
	pKnJW7ny1q+9N9cgq1mQcFVk3GqSCRhpt3WSrSZ4jOUvIKGmBrVSdBAQDmQGcE1eQaMY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3wsg-00CIwb-0E@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 14:33:02 +0000

commit b26451ec7187c9c2b8fcfb32ce854761f653fed5
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:49:15 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 47de6953fd..b8afd0b4c6 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 14:33:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 14:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412132.1642616 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wsr-0007qa-8J; Tue, 08 Sep 2026 14:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412132.1642616; Tue, 08 Sep 2026 14:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wsr-0007qR-5c; Tue, 08 Sep 2026 14:33:13 +0000
Received: by outflank-mailman (input) for mailman id 1412132;
 Tue, 08 Sep 2026 14:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3wsq-0007qJ-7g
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 14:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wsp-004qEW-2q
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wsq-00CJle-0X
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VSF2OsD8FvSsVWCF3zZXAkmnDLQMDZdneMqYnSnjuRU=; b=h0h0HyZ6xCGCHrPcRCiMG3Iz83
	Lvyg0eZIfRCiAiHHTNu90HYSf9CWc2NBnNrb7ll9HiOEdCy1/O1kq0GR0o0Lq4LRZrZnomWrgYPI1
	AGz+Nljf1LffaSsFj9L2Jk0Q6nsvuLAQevCHskJ1piP1CKObyAl/M8BNYOx3u2JQD+FI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3wsq-00CJle-0X@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 14:33:12 +0000

commit 1514f2808b8670a6d3a18175c939da23dcb6528b
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 660aff134f..841216f2ea 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -293,6 +293,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 14:33:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 14:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412133.1642620 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wt1-0007tu-9S; Tue, 08 Sep 2026 14:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412133.1642620; Tue, 08 Sep 2026 14:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wt1-0007tm-6v; Tue, 08 Sep 2026 14:33:23 +0000
Received: by outflank-mailman (input) for mailman id 1412133;
 Tue, 08 Sep 2026 14:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3wt0-0007tc-Ap
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 14:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wsz-004qEt-3A
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wt0-00CKXw-0r
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=aY34aT+UWFOdeYk8V738NbY24CUPlfGuzASG0h9wSk0=; b=FVRhVVyWo0wRdXwbvVWRYbmUvQ
	aI9LZPKiQGt/8tB/Ly6BNEzTqsQjKdcaXJktysChlxSK1IRk6BcLvQfjXXFzO3k2IgucuyM/qyXbI
	zTe8uQJfoTI1ref+VpPWmcqwlJMjFR0f3VMxSufoOngoP8VnBlxfA4lGxMkEFUFMRlgw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3wt0-00CKXw-0r@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 14:33:22 +0000

commit bd0a1cf02051f0347ac8045ab7d091d0cb389e99
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 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 7a00bf95dd..54d2d60fcc 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -163,8 +163,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) )
@@ -176,15 +174,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
@@ -284,13 +273,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);
             }
 
@@ -305,9 +287,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 0a0ebc1598..2682fff9cc 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1068,15 +1068,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)) )
     {
@@ -1101,9 +1103,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.
@@ -1357,6 +1356,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2040,7 +2046,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;
 
@@ -2069,13 +2075,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 )
@@ -2084,9 +2093,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));
 
@@ -2999,9 +3005,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 16f733281a..d128541e2c 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -202,8 +202,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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 14:33:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 14:33:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412134.1642623 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wtB-0007vw-An; Tue, 08 Sep 2026 14:33:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412134.1642623; Tue, 08 Sep 2026 14:33:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wtB-0007vp-8E; Tue, 08 Sep 2026 14:33:33 +0000
Received: by outflank-mailman (input) for mailman id 1412134;
 Tue, 08 Sep 2026 14:33:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3wtA-0007vj-EE
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 14:33:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wtA-004qEx-0G
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wtA-00CLTp-1C
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=C+NsHH1L5lmg+G9qbP9W1+TKghwshaKui8bEQ7ey7CY=; b=oJwYQgiXJnqxoPaqZvmBysGvjw
	Jas2FnKXALOhJV8kR6av3Bh87T0ZmLzAN3xKpb8vbd2YoIOpyjRywkh+b1maMLPBXqXRH2kVp3JYi
	P4ls9mzvPjjeMG2MCB2cEzd7HFJbK/bkLK5P8Yfe10OE5lhA32tGdKGiVJn+DzoD6CFc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3wtA-00CLTp-1C@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 14:33:32 +0000

commit d40ecc79501d2cb3ea0d6e883891b4509998d569
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 14:33:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 14:33:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412135.1642628 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wtL-0007zx-De; Tue, 08 Sep 2026 14:33:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412135.1642628; Tue, 08 Sep 2026 14:33:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3wtL-0007zp-Aq; Tue, 08 Sep 2026 14:33:43 +0000
Received: by outflank-mailman (input) for mailman id 1412135;
 Tue, 08 Sep 2026 14:33:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3wtK-0007zh-H5
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 14:33:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wtK-004qF1-0Y
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3wtK-00CMIE-1V
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 14:33:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=otMsxhqHRPcLhJ1G4xAEBFifxix8lyv+a1Dr7k7Q9cU=; b=hv/GMYl0WEwiXGDxzHBHO6TJGF
	jv06M1Ve8bs5LV4/TMymycnXINNiwfrgLuAZeBYjzTum47Wcy/3cIaSyZkiQRy3AeXtuSZjBltzs7
	0ToaJ9Jee5sE9TvcNorBNz7OKLuhF7Ki6Q1UQER7MbAQd1r+gvETTBXqif2b8MZxsoKA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3wtK-00CMIE-1V@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 14:33:42 +0000

commit 08daadcf1f219e36639711d9e28b6a534f069e6b
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:49:40 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:11:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:11:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412176.1642678 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTT-00073Y-T8; Tue, 08 Sep 2026 15:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412176.1642678; Tue, 08 Sep 2026 15:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTT-00073Q-PR; Tue, 08 Sep 2026 15:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1412176;
 Tue, 08 Sep 2026 15:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xTS-00073K-DQ
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTR-004quL-31
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTS-00FEeo-0i
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=tv7hj0WWqGzbR9MTdIjX1gdPi9SbOkvvMn7yAueBVjQ=; b=49Icgpa4j6qes0YR4V11+kTRaN
	ASyow1GWi2J4RzU7Pwxxu4widTKCQegLXRPF34Uc1S4BXMyHEfLT5YradVdHX0LLl/5DT2DV0+BGs
	riEPeCEKyAZGjlrqu1YhgRSCD/mU3VDCKQq247sBgYaPMYBZSZPYQOGm6Cokm4oPGy7A=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3xTS-00FEeo-0i@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:11:02 +0000

commit d9dbb246713e36bbef8860f8443304fc1600756e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:48:38 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index a2ca7e0e57..c4dec8b05c 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:11:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:11:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412177.1642680 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTd-00075C-TF; Tue, 08 Sep 2026 15:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412177.1642680; Tue, 08 Sep 2026 15:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTd-000754-Ql; Tue, 08 Sep 2026 15:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1412177;
 Tue, 08 Sep 2026 15:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xTc-00074q-CT
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTc-004quR-06
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTc-00FFVA-12
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PeiCEgwyOM0VhMt7q+IjsBtANJwUoDG6+hMFuutnN+I=; b=GN//blJvtfo2uK+6AIB36iyyiJ
	IV4OSZtWqbJezzqIJpedGqyblfwNef7gSaIYi0MXtW7E4c5nsDUGOl0qdc+CP6xDf9PefVGFvBXoQ
	oppqVV035Dsh35OWLMqZ9bI6UZ/w3ODSjUc6M8n/kaVN34u7IDc3fyZ6lHEku/7c9B9o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3xTc-00FFVA-12@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:11:12 +0000

commit e350834c3514f1a95bc92d3669a179fbb4f2a394
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 3a7976729b..41f2d0c7e1 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:
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:11:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:11:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412178.1642684 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTn-00077j-Ue; Tue, 08 Sep 2026 15:11:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412178.1642684; Tue, 08 Sep 2026 15:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTn-00077b-S9; Tue, 08 Sep 2026 15:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1412178;
 Tue, 08 Sep 2026 15:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xTm-00077S-Fv
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTm-004qun-0R
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTm-00FGOu-1M
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=mbBV7obKtQ3sgWgr0Ajcy6Pc5XOz8pRG0T/QWluGQWk=; b=rAM5adojHfAfWbVS2VSU1pJ4kB
	SqRobVY4lNRWmN/zWmWye1rBwDyFiRm4MWNrOTWOhwnfKJjc0SNkloH7PbjGA9Bd+im0K0pCVfpfX
	VoB6hxuhpqjtJHt+MD8GAif9qeB/M3vSxxQ7IQnzENyn3vkJxlZBOevsBAhO96bid6go=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3xTm-00FGOu-1M@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:11:22 +0000

commit 391bc11a86804661c8288d5a82c9c1dfcb4ea136
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 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 76a1bf1b11..6c1ea6aae2 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 a7b3b04a4d..c4a8f8bc76 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 b968f47b87..58410a367a 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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:11:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:11:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412179.1642688 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTx-00079j-WD; Tue, 08 Sep 2026 15:11:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412179.1642688; Tue, 08 Sep 2026 15:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xTx-00079b-TY; Tue, 08 Sep 2026 15:11:33 +0000
Received: by outflank-mailman (input) for mailman id 1412179;
 Tue, 08 Sep 2026 15:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xTw-00079U-Iq
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTw-004qut-0j
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xTw-00FHA4-1f
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=UW44g099dZdnPRstuBOQvStV9QCBNdxqz2jX+54Ld0Y=; b=llp6qzrbW7ch0jJrmuWvxEcONp
	FZj97ISAQkOZTdoen6mhBbcI1LnT2KOE1vgZMEVwQ+HyOcn8ZYILXPCn3G/ZzW9yTHfKYxCIrQx82
	rq/MeaR1q9sD8Jrccoqq6OCcfm0D6tmQLFejMRYJKpS+fmbRmIJJBvzzE+cQVIMnYGyY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3xTw-00FHA4-1f@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:11:32 +0000

commit b414b465a6e63caeeb5371f345b36c04adb92c9f
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:11:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:11:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412180.1642693 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xU8-0007Bc-28; Tue, 08 Sep 2026 15:11:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412180.1642693; Tue, 08 Sep 2026 15:11:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xU7-0007BU-Uw; Tue, 08 Sep 2026 15:11:43 +0000
Received: by outflank-mailman (input) for mailman id 1412180;
 Tue, 08 Sep 2026 15:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xU6-0007BO-Lo
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xU6-004qv0-12
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xU6-00FI2a-1x
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=F0peaSEXkFWoRZ+mraJNaTyZRNTjXHoK1xUgmeLob5U=; b=lfLPU/GRTRhlv4I18pkpaFm91w
	HsuCfLBiiQisyvb0nosuADZ68OF+jrvZfOoJsDaD6+86vWxL0LuCNDsoXkHyOrDoVmdN2p7gsHWJn
	sf3c/tMylJqBg5JUx5oDruYzcjs6GbgmMJLHUL1D5myJ7SxFLZ26dy3iXd0ea8ydqHNU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3xU6-00FI2a-1x@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:11:42 +0000

commit 6714207b3979b9c513ae1b99df0a3ae67d91bc47
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:48:56 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:33:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:33:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412211.1642723 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xol-0002yU-7B; Tue, 08 Sep 2026 15:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412211.1642723; Tue, 08 Sep 2026 15:33:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xol-0002yM-4H; Tue, 08 Sep 2026 15:33:03 +0000
Received: by outflank-mailman (input) for mailman id 1412211;
 Tue, 08 Sep 2026 15:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xok-0002yG-Cg
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xoj-004rGK-2N
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xok-00GvzF-02
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=J4OyEGc+tjEEcG8UCIlNPrBrJrzTKBIPf848jOvXlOM=; b=saVC2m7ThyUauX5Eh7C/KZR19p
	lngEeUW3Xyq/RMTBoE0AnzUiFvN77wRkRdj5nOm8sBUruxMTQSMnm8ECFXsQ+mOK/t3Ke8ueNJdu9
	XVwd4kCtFkGoKJYXimtTTiFozeXsom4D8IpQHA6F62N7vclqIxwfBRyE1mgF0BUSpM6c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.18] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3xok-00GvzF-02@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:33:02 +0000

commit a5817d143d4c452a420f6691fe167ef2deae98c8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:50:35 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 6813107648..94e42e1e0f 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:33:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:33:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412212.1642727 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xov-00030H-8M; Tue, 08 Sep 2026 15:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412212.1642727; Tue, 08 Sep 2026 15:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xov-000309-5d; Tue, 08 Sep 2026 15:33:13 +0000
Received: by outflank-mailman (input) for mailman id 1412212;
 Tue, 08 Sep 2026 15:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xou-0002zt-6E
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xot-004rGO-2h
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xou-00Gwrr-0N
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=YYaBGBPCDV8zgiK1MA6vRJH9RWkkkrnCRXWuOiS8XFI=; b=Y1y4iOLKVLctoDszXl7TKQYJ3q
	EoLSf/AAgjBy0NmWFH3NA/4Ykq3GqexdH19aGYJGCs3KHMySVwtPEB81Sz+UBeU5wFTFEPsysrPZ6
	2JpWVGyuqmRhnuAZuuQcZyrw0+QNCbbKbIQg5dD7A7tbLC7PnazrtjT8t1rMuWzaAGw0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.18] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3xou-00Gwrr-0N@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:33:12 +0000

commit f951c3a07c269d58b1fd4fec19609b1f9c60bb5d
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 af443555cc..97d8f2cbc4 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -261,6 +261,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:33:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412213.1642731 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xp5-00032c-9e; Tue, 08 Sep 2026 15:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412213.1642731; Tue, 08 Sep 2026 15:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xp5-00032U-71; Tue, 08 Sep 2026 15:33:23 +0000
Received: by outflank-mailman (input) for mailman id 1412213;
 Tue, 08 Sep 2026 15:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xp4-00032N-AB
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xp3-004rGl-34
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xp4-00GxiK-0h
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Ufb6cpwyoBsoIxyFS85kocAtU3w6GPJtnHVexg+Qnh8=; b=E8NCaFiV4vsJzY5M22azue591H
	RbP7KluWWoYWo6IRpTKepwhXV94LBW9n/jisp7hc1+lw7VRleYFUSRtGOOzcj7n6n42YXg0+fIrCb
	p9okjESxnmzD2PO3yn0mOg4mMESP8FtP/fTEMUPXyiRieiQMGB4nVO0YEyqN6GZVfV84=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.18] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3xp4-00GxiK-0h@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:33:22 +0000

commit 4351ad878172c61a0603b10389d7d955b0d79d8b
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 xen/common/memory.c     | 21 ---------------------
 xen/common/page_alloc.c | 22 +++++++++++++---------
 xen/include/xen/mm.h    |  2 --
 3 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 5251ab3437..640f3a70ab 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -161,8 +161,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) )
@@ -174,15 +172,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
@@ -282,13 +271,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);
             }
 
@@ -303,9 +285,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 9b5df74fdd..5e88249f50 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1030,9 +1030,7 @@ 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);
 
         /* Initialise fields which have other uses for free pages. */
         pg[i].u.inuse.type_info = PGT_TYPE_INFO_INITIALIZER;
@@ -1042,6 +1040,10 @@ static struct page_info *alloc_heap_pages(
 
     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)) )
     {
@@ -1066,9 +1068,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.
@@ -1315,6 +1314,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2791,9 +2797,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 8bc5f4249d..1fef542f6f 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -197,8 +197,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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:33:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:33:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412214.1642735 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xpF-00034d-BK; Tue, 08 Sep 2026 15:33:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412214.1642735; Tue, 08 Sep 2026 15:33:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xpF-00034V-8S; Tue, 08 Sep 2026 15:33:33 +0000
Received: by outflank-mailman (input) for mailman id 1412214;
 Tue, 08 Sep 2026 15:33:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xpE-00034P-Cw
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:33:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xpE-004rGp-09
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xpE-00GyXP-14
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ouEoFIQWj5hg1Q38TgrtcnHG8D/gwrtOMWzVk9mk8uk=; b=EtpG+tcvmrLFyWbSTpd3ec8b56
	15HBGpLcJTUgOBxjNu7vhLDVGlfbOCm53h/YuIq8HJ2Em2wA+BWfuT0BAsBDCvgmxbICpwdU9axGw
	Ecn2uK7WWpPnF9Mgk24Ct07FvGtFMoLk7GC7UqssKg+n1xCCoSrPBuumYfzxrMirqqf4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.18] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3xpE-00GyXP-14@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:33:32 +0000

commit 8db86bc4f759f6176f3d9298dc36e487c49e2229
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 432d66321c..a1d1f08f84 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:33:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:33:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412215.1642739 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xpP-000387-CX; Tue, 08 Sep 2026 15:33:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412215.1642739; Tue, 08 Sep 2026 15:33:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xpP-00037z-A0; Tue, 08 Sep 2026 15:33:43 +0000
Received: by outflank-mailman (input) for mailman id 1412215;
 Tue, 08 Sep 2026 15:33:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xpO-00037t-G2
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:33:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xpO-004rGt-0T
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xpO-00GzP8-1N
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:33:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=esRKzuIrVORIbY7RHppC3O18YAYE0th24/tblt9jPPU=; b=XPFoKf1kIfHKYFjSbKc7aCKWzy
	iSxGtvLg6ZRcM12ETTC/hmB+6IW3bJkVa+X+O9gKFkjhsGQyplR35uEJM0jiNYsZnCF6bPI3L8yA1
	4W489NBXjK7M/VROUD+Or+QgtSECk5c95rM52CXQ1hQzVNRRXArS8jUyFEHyz4RiCQBk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.18] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3xpO-00GzP8-1N@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:33:42 +0000

commit db29bf7a77831633269293a26e9eeea4cc0d6049
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:46 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 a1d1f08f84..e20c9cec0d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:44:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:44:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412226.1642751 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzQ-00055i-AK; Tue, 08 Sep 2026 15:44:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412226.1642751; Tue, 08 Sep 2026 15:44:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzQ-00055b-7S; Tue, 08 Sep 2026 15:44:04 +0000
Received: by outflank-mailman (input) for mailman id 1412226;
 Tue, 08 Sep 2026 15:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xzO-00055V-QQ
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzO-004rXf-0V
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzO-000Edr-1O
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=crn8xbUq+e4s8qycWC3rL9skwRq5gmUVftxSDaEysNY=; b=czg+geR7gdoHB/mXWFUHQCpQDj
	0d51MESlsXW8GKXVFxX7SsPYzetAnZFLswYrTSPtOCQ9k1i8FScKu5LkttIL6Hb+eqF3oGz4RMyHm
	WulL+ZzUX4f0bojMXI9V/9zxe0o92+yROFdZjRhju4JHmRK69o8KcS22CldbM1WKyq5c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.19] x86/pass-through: disallow pt_irq_create_bind() on dying domains
Message-Id: <E1x3xzO-000Edr-1O@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:44:02 +0000

commit 5dd29d6c944359d6debca3f4be59d280b5df4a66
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Aug 26 17:49:59 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    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>
    (cherry picked from commit 328a1461430f82d5f0318511e71b7143cdbca872)
---
 xen/drivers/passthrough/x86/hvm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 47de6953fd..b8afd0b4c6 100644
--- 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) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:44:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412227.1642756 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzZ-00058A-Cu; Tue, 08 Sep 2026 15:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412227.1642756; Tue, 08 Sep 2026 15:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzZ-000583-AI; Tue, 08 Sep 2026 15:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1412227;
 Tue, 08 Sep 2026 15:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xzY-00057x-JP
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzY-004rXj-0n
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzY-000FRI-1k
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=cyJVClIYCk4m4G5XXcNpdmQhxrXvN8Vzm/9xlB34SiE=; b=cv/T+GMDm3vtKPdXnAAxIpGFjz
	IxrxECbnlEZHzzTR7mHh4jU7yjmXh69hTJTPK6qxsQkMlKwZDpzak0+yczSolI5mECiEXz8GQ+kPp
	/s5nYMUrEFM+lX7lUuQ+OY2dcd4DuGAoay4WKgXWCPNtxM8gTZsLrlJSSNO4wDZ8apsY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.19] x86/emul: cope with internal handlers returning X86EMUL_RETRY
Message-Id: <E1x3xzY-000FRI-1k@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:44:12 +0000

commit aabdb184bbf9bef927f1d4786332d3d25e95c7c8
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Fri Aug 7 11:03:48 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    x86/emul: cope with internal handlers returning X86EMUL_RETRY
    
    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>
    (cherry picked from commit 62aff073266bd83fa2d675913d913134abd3c82b)
---
 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 4dde6a7b4a..a494bf68b1 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -293,6 +293,7 @@ static int hvmemul_do_io(
     switch ( rc )
     {
     case X86EMUL_OKAY:
+    case X86EMUL_RETRY:
         vio->req.state = STATE_IOREQ_NONE;
         break;
     case X86EMUL_UNHANDLEABLE:
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:44:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:44:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412228.1642760 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzk-0005AY-ER; Tue, 08 Sep 2026 15:44:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412228.1642760; Tue, 08 Sep 2026 15:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzk-0005AQ-Bp; Tue, 08 Sep 2026 15:44:24 +0000
Received: by outflank-mailman (input) for mailman id 1412228;
 Tue, 08 Sep 2026 15:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xzi-0005AF-MT
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzi-004rYD-16
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzi-000GLA-22
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=lNyWHElD3/sGSbGdWonZyvBTKvy4gzNkTCoNJDq+POM=; b=UOl/aQalqt/ytD7CC/vZ9conHE
	qiyxLifyju8i6OmTf3UZLr6mJ1o210SnQUk8ze+SmXsBHsUSsXEUQAhe9G9mhoyK6YigW40n21cn0
	UqvapqaMhCQUJM6RDVFl2H2vH8Gm7Y6awClJZdJtzNsktGSV2Be2SaWktwsy2ZmG1ayw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.19] xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
Message-Id: <E1x3xzi-000GLA-22@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:44:22 +0000

commit 6dd278418cf2e3907f7a6770363ff2ed312b0e03
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Tue Aug 4 12:23:19 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    xen/page_alloc: ensure TLB flush is done ahead of page scrubbing
    
    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>
    (cherry picked from commit ed7e656e6c18c1f5e6c7d0332fdaa8eeeee1b24e)
---
 xen/common/memory.c     | 21 ---------------------
 xen/common/page_alloc.c | 22 +++++++++++++---------
 xen/include/xen/mm.h    |  2 --
 3 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 723ab3c0da..e65d3ce3b0 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -161,8 +161,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) )
@@ -174,15 +172,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
@@ -282,13 +271,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);
             }
 
@@ -303,9 +285,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 bbb8578459..7bd565cd27 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1038,15 +1038,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)) )
     {
@@ -1071,9 +1073,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.
@@ -1320,6 +1319,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]);
                         /*
                          * We can modify count_info without holding heap
@@ -2796,9 +2802,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 7561297a75..cc7852662a 100644
--- a/xen/include/xen/mm.h
+++ b/xen/include/xen/mm.h
@@ -200,8 +200,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
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:44:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:44:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412229.1642764 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzu-0005CX-Fs; Tue, 08 Sep 2026 15:44:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412229.1642764; Tue, 08 Sep 2026 15:44:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3xzu-0005CP-DG; Tue, 08 Sep 2026 15:44:34 +0000
Received: by outflank-mailman (input) for mailman id 1412229;
 Tue, 08 Sep 2026 15:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3xzs-0005CH-P9
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzs-004rYL-1N
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3xzs-000HBw-2K
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Jdb53a53ojKZjm2yD6vG2WiI5oZGhueEh9OTjaZrFBQ=; b=BCQ0dWEBjBr7Z5i261iO4xEkhw
	9Cmlby2jqrrC8+ZSN8zVCkhOVZTQxjJjYu8oLZIRTOqY77W858lQ/zeJoi4AsPiqX5IuAJ+IWF7BN
	RN9ILERq2koU5aRJ9FF3Skppp2H8eEUA7RPhjT5VV1jixPJQNA3It61gqcxdHD56hafE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.19] oxenstored: Factor out Process.do_reconnect()
Message-Id: <E1x3xzs-000HBw-2K@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:44:32 +0000

commit 160e04b0bec78a83607709bce72e60cadae216d8
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 16:00:02 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    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>
    (cherry picked from commit 9c5a46b12066da7311a8d43202abd78956ab0bfb)
---
 tools/ocaml/xenstored/history.ml |  4 ----
 tools/ocaml/xenstored/process.ml | 17 ++++++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/ocaml/xenstored/history.ml b/tools/ocaml/xenstored/history.ml
index f03fb18329..3474a62da2 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 0c9c460a99..bc68c54c9a 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
   )
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.19


From xen-changelog-bounces@lists.xenproject.org Tue Sep 08 15:44:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Sep 2026 15:44:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1412230.1642768 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3y04-0005ET-HY; Tue, 08 Sep 2026 15:44:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1412230.1642768; Tue, 08 Sep 2026 15:44:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x3y04-0005EM-Ec; Tue, 08 Sep 2026 15:44:44 +0000
Received: by outflank-mailman (input) for mailman id 1412230;
 Tue, 08 Sep 2026 15:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x3y02-0005EE-Rx
 for xen-changelog@lists.xenproject.org; Tue, 08 Sep 2026 15:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3y02-004rYb-1e
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x3y02-000Hyi-2a
 for xen-changelog@lists.xenproject.org;
 Tue, 08 Sep 2026 15:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=wHlXlerVf9EJPCLsPpELNLtfQUc6LIm8GWquPbuX/O8=; b=5yZJcFAshmwN4QxA8QmROzNL51
	4DLlHore23Hr+jGgRmQJrTd0br0L1yHWJUdVBffQaj5bi8Ke4nkV/9HHR0vFRMmVZLPlhMmjldnOm
	W/0AAVz+0DfH4wnt9u2Nu53s22mkfUkMKo2affS3xHBJEPpcKElqOSNS79O8NWxpkGF4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.19] oxenstored: Reset the watches trie on domain reconnect
Message-Id: <E1x3y02-000Hyi-2a@xenbits.xenproject.org>
Date: Tue, 08 Sep 2026 15:44:42 +0000

commit 3f22c5d1317a2c3eea143dd3962c5863dfe3967a
Author:     Andrii Sultanov <andriy.sultanov@vates.tech>
AuthorDate: Thu Aug 20 15:00:02 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Aug 26 17:50:14 2026 +0100

    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>
    (cherry picked from commit a2ca4f8b9890899ca89d6116002e7a9c5957d8c6)
---
 tools/ocaml/xenstored/connection.ml |  4 +---
 tools/ocaml/xenstored/process.ml    | 11 +++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index d11011e164..37eb2444b9 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 bc68c54c9a..fc2558ac3d 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
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.19


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 13:44:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 13:44:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413119.1643366 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Iap-0000d1-Do; Wed, 09 Sep 2026 13:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413119.1643366; Wed, 09 Sep 2026 13:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Iap-0000ct-At; Wed, 09 Sep 2026 13:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1413119;
 Wed, 09 Sep 2026 13:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Ian-0000cO-VJ
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 13:44:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Ian-006Sa0-11
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 13:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Ian-007OaJ-1v
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 13:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=3uKpJgPI19Rt4fpOgS1zcwp/VgK/3OGjD/xoJ4eBXrU=; b=i+grwy5uDTxRHpo47gd5ElDAW6
	4OnxovAz2IVNPwwVbbPUhI8tKey8LiEpqHk5YVdbq8SIFCj1z1RuQ4aer3qRzkSbpBFgvjvaoqzIx
	iPBvtBdxsS0AzTptBEj+fcbZpBiW1iB75BDmUGdz8X0ezAxty96Kgq6kBzxYzZsq9TCU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4Ian-007OaJ-1v@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 13:44:01 +0000

commit 5df9425a733ea42613d2f414ec88d2c770ea4c20
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 9 14:15:15 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 9 14:15:15 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index f91ba6f740..b1462883ec 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -27,10 +27,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 13:44:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 13:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413122.1643370 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Iaz-0000iT-Fz; Wed, 09 Sep 2026 13:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413122.1643370; Wed, 09 Sep 2026 13:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Iaz-0000iJ-CD; Wed, 09 Sep 2026 13:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1413122;
 Wed, 09 Sep 2026 13:44:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Iax-0000i1-Og
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 13:44:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Iax-006Sa4-1K
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 13:44:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Iax-007PVl-2F
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 13:44:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Q9vRjRDDgmG7JsgWv6hSekc2x8DmVeWh2FLzORWcMlE=; b=un7sQpZ86OTBOM/cS0pVApgSZG
	UsJWQSI026XtkoGzcBABWRbWEOdr5Lh+ZN4By6w8B9qj80X8+eSvTkMm8I/0Ilw9z2wzBe3izwn2U
	lrJGS496A+XsAmg177Ly8h6JUJXb5tnEs+bLg+RlbdQU2nBrIZ4NmWmu9XncbkIyG9fs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/HVM: move evtchn_upcall_vector field
Message-Id: <E1x4Iax-007PVl-2F@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 13:44:11 +0000

commit cd68e5bc029a8a7b0955c8379eba4d7fdf9492f1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 9 14:15:43 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 9 14:15:43 2026 +0200

    x86/HVM: move evtchn_upcall_vector field
    
    ... into an available 8-bit slot, rather than having it followed by 7
    bytes of padding.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/include/asm/hvm/vcpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/hvm/vcpu.h b/xen/arch/x86/include/asm/hvm/vcpu.h
index 60d1c8f188..876c230784 100644
--- a/xen/arch/x86/include/asm/hvm/vcpu.h
+++ b/xen/arch/x86/include/asm/hvm/vcpu.h
@@ -129,6 +129,8 @@ struct hvm_vcpu {
     spinlock_t          tm_lock;
     struct list_head    tm_list;
 
+    uint8_t             evtchn_upcall_vector;
+
     bool                flag_dr_dirty;
     bool                debug_state_latch;
     bool                single_step;
@@ -165,8 +167,6 @@ struct hvm_vcpu {
     /* In mode delay_for_missed_ticks, VCPUs have differing guest times. */
     int64_t             stime_offset;
 
-    u8                  evtchn_upcall_vector;
-
     struct hvm_vcpu_io  hvm_io;
 
     /* Pending hw/sw interrupt (.vector = -1 means nothing pending). */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 15:11:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 15:11:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413372.1643644 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Jx1-0002la-3c; Wed, 09 Sep 2026 15:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413372.1643644; Wed, 09 Sep 2026 15:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Jx1-0002lS-13; Wed, 09 Sep 2026 15:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1413372;
 Wed, 09 Sep 2026 15:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Jx0-0002lM-8r
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 15:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Jwz-006UJT-1n
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 15:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Jwz-00F0CG-2j
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 15:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2FDE2RcZu3f1T0K2rTCUUzYrO9h8Dv2VixSJ/MGiTNc=; b=ronf+oE+f80eFxcGK/9lrBkxH6
	Jz1DNI3kwZG5YbfpXfzZ4YUMFB0aRL2tJkeH6R3q9kLLbOTatbyO+MxOUBEq+pz9Wi+aEkp2B5znh
	lC4h/j7DQjOuq+QzrV3LApXfgsFelgQCZCGzXvYD4gjVYAnvMYxuHXhKoCsE/Y99Ltmc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4Jwz-00F0CG-2j@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 15:11:01 +0000

commit 5df9425a733ea42613d2f414ec88d2c770ea4c20
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 9 14:15:15 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 9 14:15:15 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index f91ba6f740..b1462883ec 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -27,10 +27,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 15:11:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 15:11:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413373.1643647 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4JxB-0002oC-54; Wed, 09 Sep 2026 15:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413373.1643647; Wed, 09 Sep 2026 15:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4JxB-0002o4-2J; Wed, 09 Sep 2026 15:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1413373;
 Wed, 09 Sep 2026 15:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Jx9-0002ns-WE
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 15:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Jx9-006UJX-25
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 15:11:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Jx9-00F1aJ-31
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 15:11:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=DigfchPQafqV8Y5Ztm7WoQa9YUOtVv0dUQz1dkREUHU=; b=JEC4JSdok+HSi6AfyuCha9wZNo
	4DSE7PVUTiBq+BGCsyJZ53IhdmW4DDOsIX//VGJ7hXippB1as5SIoeMR9XUDXzTeSSHc3PPJvUtti
	xDzXhBbEZguq2meOWnk8imUFdgtw94qCWGIxvewU8Pu2MzYI8tpoUgMtTSYeCIcvKoHc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/HVM: move evtchn_upcall_vector field
Message-Id: <E1x4Jx9-00F1aJ-31@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 15:11:11 +0000

commit cd68e5bc029a8a7b0955c8379eba4d7fdf9492f1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 9 14:15:43 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 9 14:15:43 2026 +0200

    x86/HVM: move evtchn_upcall_vector field
    
    ... into an available 8-bit slot, rather than having it followed by 7
    bytes of padding.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/include/asm/hvm/vcpu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/hvm/vcpu.h b/xen/arch/x86/include/asm/hvm/vcpu.h
index 60d1c8f188..876c230784 100644
--- a/xen/arch/x86/include/asm/hvm/vcpu.h
+++ b/xen/arch/x86/include/asm/hvm/vcpu.h
@@ -129,6 +129,8 @@ struct hvm_vcpu {
     spinlock_t          tm_lock;
     struct list_head    tm_list;
 
+    uint8_t             evtchn_upcall_vector;
+
     bool                flag_dr_dirty;
     bool                debug_state_latch;
     bool                single_step;
@@ -165,8 +167,6 @@ struct hvm_vcpu {
     /* In mode delay_for_missed_ticks, VCPUs have differing guest times. */
     int64_t             stime_offset;
 
-    u8                  evtchn_upcall_vector;
-
     struct hvm_vcpu_io  hvm_io;
 
     /* Pending hw/sw interrupt (.vector = -1 means nothing pending). */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 17:11:10 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 17:11:10 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413512.1643706 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Lp9-00083G-Nm; Wed, 09 Sep 2026 17:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413512.1643706; Wed, 09 Sep 2026 17:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Lp9-000838-LA; Wed, 09 Sep 2026 17:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1413512;
 Wed, 09 Sep 2026 17:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Lp8-000832-22
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 17:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Lp7-006X33-1r
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Lp7-008Zub-2n
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2xkTE+YJ7bIFyeqv1NXhxymj128+Pmol8jtHCO6/IUg=; b=EuAlW/nKtFzWTLtOCFzcnhR/gT
	T3LHPucQqgkXj7b5ne8AiIfWp0CwL7+OH5lpR20cqw29OK2BimV56j3yEbguXHLKhJVgVo3XszvVU
	aw9X5Oe9hVFSjzYlY09kB7gDcb2Uyt17FMiUAg4BcDMUcoPlKYkYQ2aCBBmVSoVmbEeE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/cpu: Rewrite initialize_cpu_data() for clarity
Message-Id: <E1x4Lp7-008Zub-2n@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 17:11:01 +0000

commit 1ff8c6e289c78749c46d6497e6d7fac49347bb70
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Jan 28 18:10:45 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/cpu: Rewrite initialize_cpu_data() for clarity
    
    Without passing opinion on the behaviour of this function, it is deceptive to
    read (I've twice now mistaken it for resetting boot_cpu_data), and
    inefficient.
    
    Instead of having a 256 byte object on the stack and a double copy, copy
    boot_cpu_data directly, then reset parts of cpu_data[cpu] in place.  Leave
    some comments behind explaining what's happening.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/smpboot.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 84e9e4beed..cede2b886f 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -94,12 +94,14 @@ void *stack_base[NR_CPUS];
 
 void initialize_cpu_data(unsigned int cpu)
 {
-    struct cpuinfo_x86 c = boot_cpu_data;
+    struct cpuinfo_x86 *c = &cpu_data[cpu];
 
-    /* Must not partially clear the BSP's collected data. */
+    /* First, inherit from boot_cpu_data */
+    *c = boot_cpu_data;
+
+    /* Second, reset most of it, except if we're the BSP at early boot. */
     if ( cpu || system_state > SYS_STATE_smp_boot )
-        reset_cpuinfo(&c, true);
-    cpu_data[cpu] = c;
+        reset_cpuinfo(c, true);
 }
 
 static bool smp_store_cpu_info(unsigned int id)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 17:11:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 17:11:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413513.1643710 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4LpJ-00084g-Pf; Wed, 09 Sep 2026 17:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413513.1643710; Wed, 09 Sep 2026 17:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4LpJ-00084Y-Mo; Wed, 09 Sep 2026 17:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1413513;
 Wed, 09 Sep 2026 17:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4LpI-00084M-1B
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 17:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4LpH-006X37-2A
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4LpH-008aUS-36
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=LDCbuaUFVtmc2LLOTqshWjOeFxDLfeyGZt6IeAXe4CY=; b=5UQgpx9WzlhJ6tOiaiHVmCKXbO
	6y3bmcf4GbS4FHcqxI6LQrZzcq0hQ18ZVUDtMvrpw3klQRbmPzV5DQQ/gddOP70Y0ndiohPalC+aF
	sEBY+fh/pKnfyqHu2UDmsYvSzJIPeXN9JQIRXtW5NYRGJu8EHb+qpk+gC4/feTrM6BNE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pv: Convert struct mmio_ro_emulate_ctxt to use pci_sbdf_t
Message-Id: <E1x4LpH-008aUS-36@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 17:11:11 +0000

commit e1ddc74203d9c4bf8a51f59edfb9fe40ebf73525
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Sep 8 19:43:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/pv: Convert struct mmio_ro_emulate_ctxt to use pci_sbdf_t
    
    This will be used to simplify some call chains.  Reposition the new field to
    avoid creating a interior hole.
    
    No functional change.
    
    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/pv/ro-page-fault.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c
index d89306d34f..e70e09a6a6 100644
--- a/xen/arch/x86/pv/ro-page-fault.c
+++ b/xen/arch/x86/pv/ro-page-fault.c
@@ -301,10 +301,10 @@ static int ptwr_do_page_fault(struct x86_emulate_ctxt *ctxt,
 
 struct mmio_ro_emulate_ctxt {
     unsigned long cr2;
-    /* Used only for mmcfg case */
-    unsigned int seg, bdf;
     /* Used only for non-mmcfg case */
     mfn_t mfn;
+    /* Used only for mmcfg case */
+    pci_sbdf_t sbdf;
 };
 
 static int cf_check mmcfg_intercept_write(
@@ -329,10 +329,10 @@ static int cf_check mmcfg_intercept_write(
     }
 
     offset &= 0xfff;
-    if ( pci_conf_write_intercept(mmio_ctxt->seg, mmio_ctxt->bdf,
+    if ( pci_conf_write_intercept(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bdf,
                                   offset, bytes, p_data) >= 0 )
-        pci_mmcfg_write(mmio_ctxt->seg, PCI_BUS(mmio_ctxt->bdf),
-                        PCI_DEVFN(mmio_ctxt->bdf), offset, bytes,
+        pci_mmcfg_write(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bus,
+                        mmio_ctxt->sbdf.devfn, offset, bytes,
                         *(uint32_t *)p_data);
 
     return X86EMUL_OKAY;
@@ -390,6 +390,7 @@ static int mmio_ro_do_page_fault(struct x86_emulate_ctxt *ctxt,
                                  unsigned long addr, l1_pgentry_t pte)
 {
     struct mmio_ro_emulate_ctxt mmio_ro_ctxt = { .cr2 = addr };
+    unsigned int seg, bdf;
     mfn_t mfn = l1e_get_mfn(pte);
 
     if ( mfn_valid(mfn) )
@@ -404,8 +405,12 @@ static int mmio_ro_do_page_fault(struct x86_emulate_ctxt *ctxt,
     }
 
     ctxt->data = &mmio_ro_ctxt;
-    if ( pci_ro_mmcfg_decode(mfn_x(mfn), &mmio_ro_ctxt.seg, &mmio_ro_ctxt.bdf) )
+    if ( pci_ro_mmcfg_decode(mfn_x(mfn), &seg, &bdf) )
+    {
+        mmio_ro_ctxt.sbdf = PCI_SBDF(seg, bdf);
+
         return x86_emulate(ctxt, &mmcfg_intercept_ops);
+    }
 
     mmio_ro_ctxt.mfn = mfn;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 17:11:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 17:11:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413514.1643714 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4LpT-00086s-RA; Wed, 09 Sep 2026 17:11:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413514.1643714; Wed, 09 Sep 2026 17:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4LpT-00086k-O5; Wed, 09 Sep 2026 17:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1413514;
 Wed, 09 Sep 2026 17:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4LpS-00086Z-4F
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 17:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4LpR-006X3B-2V
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4LpS-008b33-0A
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=LuR4p2XuKve6ovrKY7TjrrPwyR1IuimAK+j3xbCEOAA=; b=auzDbQTl3t+9AVk2RhVfPJNdaL
	heWjeZXRFs02bcoyf/wvrqAxo5U5+sAUAtbRENIDzbEGftd7HfQEdokepjk8FyKKsNh+zIyJkloHU
	bTci10rq8vAEzPjceh0YkvFVkryqnSI7m8PC3GZKoAsn1v9wPuiS462eVFYknW/oWLhc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pci: Convert pci_mmcfg_{read,write}() to use pci_sbdf_t
Message-Id: <E1x4LpS-008b33-0A@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 17:11:22 +0000

commit 04670075bc0d8f4ac13496d3cec630d66ac2b319
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Sep 8 19:43:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/pci: Convert pci_mmcfg_{read,write}() to use pci_sbdf_t
    
    All callers now have an sbdf.  Pass it down directly, rather than splitting
    into three parameters.
    
    In turn this shows that bus and devfn could never be out of bounds, so drop
    those checks too.
    
    No functional change.
    
    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/pv/ro-page-fault.c   |  4 +---
 xen/arch/x86/x86_64/mmconfig_64.c | 18 ++++++++----------
 xen/arch/x86/x86_64/pci.c         | 12 ++++++------
 xen/include/xen/pci.h             |  8 ++++----
 4 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c
index e70e09a6a6..c10541709e 100644
--- a/xen/arch/x86/pv/ro-page-fault.c
+++ b/xen/arch/x86/pv/ro-page-fault.c
@@ -331,9 +331,7 @@ static int cf_check mmcfg_intercept_write(
     offset &= 0xfff;
     if ( pci_conf_write_intercept(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bdf,
                                   offset, bytes, p_data) >= 0 )
-        pci_mmcfg_write(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bus,
-                        mmio_ctxt->sbdf.devfn, offset, bytes,
-                        *(uint32_t *)p_data);
+        pci_mmcfg_write(mmio_ctxt->sbdf, offset, bytes, *(uint32_t *)p_data);
 
     return X86EMUL_OKAY;
 }
diff --git a/xen/arch/x86/x86_64/mmconfig_64.c b/xen/arch/x86/x86_64/mmconfig_64.c
index 91b1a398e6..6477bf8b44 100644
--- a/xen/arch/x86/x86_64/mmconfig_64.c
+++ b/xen/arch/x86/x86_64/mmconfig_64.c
@@ -55,19 +55,18 @@ static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned i
      return addr + ((bus << 20) | (devfn << 12));
 }
 
-int pci_mmcfg_read(unsigned int seg, unsigned int bus,
-              unsigned int devfn, int reg, int len, u32 *value)
+int pci_mmcfg_read(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t *value)
 {
     char __iomem *addr;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
-    if (unlikely((bus > 255) || (devfn > 255) ||
-                 (reg + len > PCI_CFG_SPACE_EXP_SIZE))) {
+    if (unlikely(reg + len > PCI_CFG_SPACE_EXP_SIZE)) {
 err:        *value = -1;
         return -EINVAL;
     }
 
-    addr = pci_dev_base(seg, bus, devfn);
+    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
     if (!addr)
         goto err;
 
@@ -86,17 +85,16 @@ err:        *value = -1;
     return 0;
 }
 
-int pci_mmcfg_write(unsigned int seg, unsigned int bus,
-               unsigned int devfn, int reg, int len, u32 value)
+int pci_mmcfg_write(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t value)
 {
     char __iomem *addr;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
-    if (unlikely((bus > 255) || (devfn > 255) ||
-                 (reg + len > PCI_CFG_SPACE_EXP_SIZE)))
+    if (unlikely(reg + len > PCI_CFG_SPACE_EXP_SIZE))
         return -EINVAL;
 
-    addr = pci_dev_base(seg, bus, devfn);
+    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
     if (!addr)
         return -EINVAL;
 
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 6298141c3c..970c010e12 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -17,7 +17,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
     if ( sbdf.seg || reg > 255 )
     {
-        pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, &value);
+        pci_mmcfg_read(sbdf, reg, 1, &value);
         return value;
     }
 
@@ -30,7 +30,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
     {
         uint32_t value;
 
-        pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, &value);
+        pci_mmcfg_read(sbdf, reg, 2, &value);
         return value;
     }
 
@@ -43,7 +43,7 @@ uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
     {
         uint32_t value;
 
-        pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, &value);
+        pci_mmcfg_read(sbdf, reg, 4, &value);
         return value;
     }
 
@@ -53,7 +53,7 @@ uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 {
     if ( sbdf.seg || reg > 255 )
-        pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, data);
+        pci_mmcfg_write(sbdf, reg, 1, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 3, 1, data);
 }
@@ -61,7 +61,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
     if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
-        pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
+        pci_mmcfg_write(sbdf, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
 }
@@ -69,7 +69,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
     if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
-        pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
+        pci_mmcfg_write(sbdf, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
 }
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index ade882caee..b7a35371a7 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -258,10 +258,10 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data);
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data);
 uint32_t pci_conf_read(uint32_t cf8, uint8_t offset, uint8_t bytes);
 void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data);
-int pci_mmcfg_read(unsigned int seg, unsigned int bus,
-                   unsigned int devfn, int reg, int len, u32 *value);
-int pci_mmcfg_write(unsigned int seg, unsigned int bus,
-                    unsigned int devfn, int reg, int len, u32 value);
+int pci_mmcfg_read(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t *value);
+int pci_mmcfg_write(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t value);
 unsigned int pci_find_cap_offset(pci_sbdf_t sbdf, unsigned int cap);
 unsigned int pci_find_next_cap_ttl(pci_sbdf_t sbdf, unsigned int pos,
                                    const unsigned int caps[], unsigned int n,
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 17:11:32 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 17:11:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413515.1643718 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Lpc-00089V-Ty; Wed, 09 Sep 2026 17:11:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413515.1643718; Wed, 09 Sep 2026 17:11:32 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Lpc-00089E-RG; Wed, 09 Sep 2026 17:11:32 +0000
Received: by outflank-mailman (input) for mailman id 1413515;
 Wed, 09 Sep 2026 17:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Lpc-000898-7D
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 17:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Lpb-006X3H-2n
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Lpc-008bUM-0V
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=x9SghpLoMCF/BqgsR7NV7sOJNR1U8xr17HEh8LuppCw=; b=rtlOOu3M9usCtP7Dh1Z4Qq88ar
	Q0q2TEyDOP/ySQ1PSA1XgPnJm5fFpWc4M22SnEIiSKoMgFI44OEyNk+XFZpRz831U9UDzdoRrdZGb
	3Ss2zoxmEZz13PqzT+rtLHm+qKp27LlDK2RAizZeIToYiQgz3BMv68f0G6JPXmW2gu5w=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pci: Update pci_conf_write_intercept() to use pci_sbdf_t
Message-Id: <E1x4Lpc-008bUM-0V@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 17:11:32 +0000

commit f3a525c25932cfa28b29e05c4f52b424c88d766c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Sep 8 19:43:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/pci: Update pci_conf_write_intercept() to use pci_sbdf_t
    
    ... rather than splitting across two parameters.
    
    No functional change.
    
    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/include/asm/pci.h  |  5 ++---
 xen/arch/x86/pci.c              |  6 ++----
 xen/arch/x86/pv/emul-priv-op.c  | 10 +++++-----
 xen/arch/x86/pv/ro-page-fault.c |  3 +--
 4 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/include/asm/pci.h b/xen/arch/x86/include/asm/pci.h
index 0b98081aea..8d8e66928d 100644
--- a/xen/arch/x86/include/asm/pci.h
+++ b/xen/arch/x86/include/asm/pci.h
@@ -36,9 +36,8 @@ struct arch_pci_dev {
     struct page_list_head pgtables_list;
 };
 
-int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
-                             unsigned int reg, unsigned int size,
-                             uint32_t *data);
+int pci_conf_write_intercept(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int size, uint32_t *data);
 int pci_msi_conf_write_intercept(struct pci_dev *pdev, unsigned int reg,
                                  unsigned int size, uint32_t *data);
 bool pci_mmcfg_decode(unsigned long mfn, unsigned int *seg,
diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index 4c27987551..0731f7e762 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -72,11 +72,9 @@ void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data)
     spin_unlock_irqrestore(&pci_config_lock, flags);
 }
 
-int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
-                             unsigned int reg, unsigned int size,
-                             uint32_t *data)
+int pci_conf_write_intercept(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int size, uint32_t *data)
 {
-    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
     int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, true);
diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index dc21515e44..fd9b533e57 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -228,7 +228,7 @@ static bool admin_io_okay(unsigned int port, unsigned int bytes,
 static bool pci_cfg_ok(struct domain *currd, unsigned int start,
                        unsigned int size, uint32_t *write)
 {
-    uint32_t machine_bdf;
+    pci_sbdf_t sbdf = {}; /* Seg always 0 for IO port CFG accesses. */
 
     if ( !is_hardware_domain(currd) )
         return false;
@@ -236,12 +236,12 @@ static bool pci_cfg_ok(struct domain *currd, unsigned int start,
     if ( !CF8_ENABLED(currd->arch.pci_cf8) )
         return true;
 
-    machine_bdf = CF8_BDF(currd->arch.pci_cf8);
+    sbdf.bdf = CF8_BDF(currd->arch.pci_cf8);
     if ( write )
     {
         const unsigned long *ro_map = pci_get_ro_map(0);
 
-        if ( ro_map && test_bit(machine_bdf, ro_map) )
+        if ( ro_map && test_bit(sbdf.bdf, ro_map) )
             return false;
     }
     start |= CF8_ADDR_LO(currd->arch.pci_cf8);
@@ -259,9 +259,9 @@ static bool pci_cfg_ok(struct domain *currd, unsigned int start,
     }
 
     return !write ?
-           xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
+           xsm_pci_config_permission(XSM_HOOK, currd, sbdf.sbdf,
                                      start, start + size - 1, false) == 0 :
-           pci_conf_write_intercept(0, machine_bdf, start, size, write) >= 0;
+           pci_conf_write_intercept(sbdf, start, size, write) >= 0;
 }
 
 static uint32_t guest_io_read(unsigned int port, unsigned int bytes,
diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c
index c10541709e..34349e9437 100644
--- a/xen/arch/x86/pv/ro-page-fault.c
+++ b/xen/arch/x86/pv/ro-page-fault.c
@@ -329,8 +329,7 @@ static int cf_check mmcfg_intercept_write(
     }
 
     offset &= 0xfff;
-    if ( pci_conf_write_intercept(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bdf,
-                                  offset, bytes, p_data) >= 0 )
+    if ( pci_conf_write_intercept(mmio_ctxt->sbdf, offset, bytes, p_data) >= 0 )
         pci_mmcfg_write(mmio_ctxt->sbdf, offset, bytes, *(uint32_t *)p_data);
 
     return X86EMUL_OKAY;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 09 17:11:42 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Sep 2026 17:11:42 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413516.1643722 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Lpm-0008Bg-VU; Wed, 09 Sep 2026 17:11:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413516.1643722; Wed, 09 Sep 2026 17:11:42 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Lpm-0008BY-Sa; Wed, 09 Sep 2026 17:11:42 +0000
Received: by outflank-mailman (input) for mailman id 1413516;
 Wed, 09 Sep 2026 17:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Lpm-0008BS-AO
 for xen-changelog@lists.xenproject.org; Wed, 09 Sep 2026 17:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Lpl-006X3g-34
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Lpm-008bwD-0n
 for xen-changelog@lists.xenproject.org;
 Wed, 09 Sep 2026 17:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Cw4K8nJGVfXHnB376+aMlBHpSNlgnVZ/wCIX+gWFvtU=; b=wkczpcTdiR1ZXBuDJBPhTjm8dl
	gi/JumgC0V/9f3BEU8EEbtJTCqRHMf7upcpw+nOM79JDXCUPk8gJpYMpC8PkI/FPyr2YJ27exrjM0
	XoNBVaOHx4NzA/CxfGZqI/DOlElU01JDClek6fj20IO1p7n+3WCZao6ccTgdhqpzE7HU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4Lpm-008bwD-0n@xenbits.xenproject.org>
Date: Wed, 09 Sep 2026 17:11:42 +0000

commit 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jun 16 11:47:41 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/microcode/intel.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index c45b00c6b0..425bfc1045 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -27,6 +27,7 @@
 #include <xen/string.h>
 #include <xen/xmalloc.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -273,6 +274,44 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.vfm == INTEL_GRANITERAPIDS_X &&
+         boot_cpu_data.stepping == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -365,6 +404,7 @@ static struct microcode_patch *cf_check intel_ucode_parse(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 05:55:09 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 05:55:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413931.1643807 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4XkU-0007yY-Um; Thu, 10 Sep 2026 05:55:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413931.1643807; Thu, 10 Sep 2026 05:55:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4XkU-0007yP-S7; Thu, 10 Sep 2026 05:55:02 +0000
Received: by outflank-mailman (input) for mailman id 1413931;
 Thu, 10 Sep 2026 05:55:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4XkT-0007yJ-Lw
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 05:55:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4XkT-007xnY-0h
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4XkT-001Ohh-1b
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sBehB8L9FfElOfzM91ZWJzsYgfoWkOLQI0UWG6q7PkA=; b=UiAzLHMcwT1ai/GbhL8Vno8nMN
	4ZG1KPh7/OI0ldlceXd8jgGiRyfh+aNnbpmWK5rMGM02ON/XCLBiF0csS+gePedOiV6fW1HsdRUmB
	gC8JDw3GHe8PI0G2pI84hL7xgANVekqu6OQ3uHjgXyxX0Wt4fmFiz1Xz5Rf5XlP0rcmU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/cpu: Rewrite initialize_cpu_data() for clarity
Message-Id: <E1x4XkT-001Ohh-1b@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 05:55:01 +0000

commit 1ff8c6e289c78749c46d6497e6d7fac49347bb70
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Jan 28 18:10:45 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/cpu: Rewrite initialize_cpu_data() for clarity
    
    Without passing opinion on the behaviour of this function, it is deceptive to
    read (I've twice now mistaken it for resetting boot_cpu_data), and
    inefficient.
    
    Instead of having a 256 byte object on the stack and a double copy, copy
    boot_cpu_data directly, then reset parts of cpu_data[cpu] in place.  Leave
    some comments behind explaining what's happening.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/smpboot.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 84e9e4beed..cede2b886f 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -94,12 +94,14 @@ void *stack_base[NR_CPUS];
 
 void initialize_cpu_data(unsigned int cpu)
 {
-    struct cpuinfo_x86 c = boot_cpu_data;
+    struct cpuinfo_x86 *c = &cpu_data[cpu];
 
-    /* Must not partially clear the BSP's collected data. */
+    /* First, inherit from boot_cpu_data */
+    *c = boot_cpu_data;
+
+    /* Second, reset most of it, except if we're the BSP at early boot. */
     if ( cpu || system_state > SYS_STATE_smp_boot )
-        reset_cpuinfo(&c, true);
-    cpu_data[cpu] = c;
+        reset_cpuinfo(c, true);
 }
 
 static bool smp_store_cpu_info(unsigned int id)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 05:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 05:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413932.1643811 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xke-00080B-WC; Thu, 10 Sep 2026 05:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413932.1643811; Thu, 10 Sep 2026 05:55:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xke-000803-TS; Thu, 10 Sep 2026 05:55:12 +0000
Received: by outflank-mailman (input) for mailman id 1413932;
 Thu, 10 Sep 2026 05:55:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Xkd-0007zv-Ly
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 05:55:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xkd-007xnf-11
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xkd-001Osx-1v
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eK07h3DsHJFjupe4WG6F5/VEcqdcYe/q9Sdnksu10WI=; b=kNp0UpAM6ENhkzc08Y49lfaRVZ
	sY+Px+4yb3cZXIvjp1jG1mLO7Gfxz5G5xtzQgaQleqC1QEYxXZTfPI1IOgVx80dwDjOJxaTO3Bx0n
	TnRAsPkwEWTVjbpOECkYTCMi7rSmEyYXYiKHH+ijrC7PInsCc5VDbJeU1jgSjPKLXCYM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pv: Convert struct mmio_ro_emulate_ctxt to use pci_sbdf_t
Message-Id: <E1x4Xkd-001Osx-1v@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 05:55:11 +0000

commit e1ddc74203d9c4bf8a51f59edfb9fe40ebf73525
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Sep 8 19:43:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/pv: Convert struct mmio_ro_emulate_ctxt to use pci_sbdf_t
    
    This will be used to simplify some call chains.  Reposition the new field to
    avoid creating a interior hole.
    
    No functional change.
    
    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/pv/ro-page-fault.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c
index d89306d34f..e70e09a6a6 100644
--- a/xen/arch/x86/pv/ro-page-fault.c
+++ b/xen/arch/x86/pv/ro-page-fault.c
@@ -301,10 +301,10 @@ static int ptwr_do_page_fault(struct x86_emulate_ctxt *ctxt,
 
 struct mmio_ro_emulate_ctxt {
     unsigned long cr2;
-    /* Used only for mmcfg case */
-    unsigned int seg, bdf;
     /* Used only for non-mmcfg case */
     mfn_t mfn;
+    /* Used only for mmcfg case */
+    pci_sbdf_t sbdf;
 };
 
 static int cf_check mmcfg_intercept_write(
@@ -329,10 +329,10 @@ static int cf_check mmcfg_intercept_write(
     }
 
     offset &= 0xfff;
-    if ( pci_conf_write_intercept(mmio_ctxt->seg, mmio_ctxt->bdf,
+    if ( pci_conf_write_intercept(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bdf,
                                   offset, bytes, p_data) >= 0 )
-        pci_mmcfg_write(mmio_ctxt->seg, PCI_BUS(mmio_ctxt->bdf),
-                        PCI_DEVFN(mmio_ctxt->bdf), offset, bytes,
+        pci_mmcfg_write(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bus,
+                        mmio_ctxt->sbdf.devfn, offset, bytes,
                         *(uint32_t *)p_data);
 
     return X86EMUL_OKAY;
@@ -390,6 +390,7 @@ static int mmio_ro_do_page_fault(struct x86_emulate_ctxt *ctxt,
                                  unsigned long addr, l1_pgentry_t pte)
 {
     struct mmio_ro_emulate_ctxt mmio_ro_ctxt = { .cr2 = addr };
+    unsigned int seg, bdf;
     mfn_t mfn = l1e_get_mfn(pte);
 
     if ( mfn_valid(mfn) )
@@ -404,8 +405,12 @@ static int mmio_ro_do_page_fault(struct x86_emulate_ctxt *ctxt,
     }
 
     ctxt->data = &mmio_ro_ctxt;
-    if ( pci_ro_mmcfg_decode(mfn_x(mfn), &mmio_ro_ctxt.seg, &mmio_ro_ctxt.bdf) )
+    if ( pci_ro_mmcfg_decode(mfn_x(mfn), &seg, &bdf) )
+    {
+        mmio_ro_ctxt.sbdf = PCI_SBDF(seg, bdf);
+
         return x86_emulate(ctxt, &mmcfg_intercept_ops);
+    }
 
     mmio_ro_ctxt.mfn = mfn;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 05:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 05:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413933.1643815 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xkp-00082I-19; Thu, 10 Sep 2026 05:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413933.1643815; Thu, 10 Sep 2026 05:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xko-00082B-Ur; Thu, 10 Sep 2026 05:55:22 +0000
Received: by outflank-mailman (input) for mailman id 1413933;
 Thu, 10 Sep 2026 05:55:21 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Xkn-000823-Oi
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 05:55:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xkn-007xnj-1K
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xkn-001P5P-2F
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=yT5uYTDG64eGg/2E9KoWqmFFq+55PrKXb4Wx7CgEHGw=; b=jJvRoHtnBshDdD2PLxGjyK5W49
	yzeL6loXtNiiL5MEwtrLjXiUdkHKEjVfwm70D1hmxiFFmHjyORhmLcSvJowvL+Y9NtRrtcXit6XDH
	VjUYvq9UIyQMUcCwrHxhEmvQPeRgyUkQ2FAFpmkNiYo60UqILanaNKLIeLiYqY+yfR4o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pci: Convert pci_mmcfg_{read,write}() to use pci_sbdf_t
Message-Id: <E1x4Xkn-001P5P-2F@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 05:55:21 +0000

commit 04670075bc0d8f4ac13496d3cec630d66ac2b319
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Sep 8 19:43:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/pci: Convert pci_mmcfg_{read,write}() to use pci_sbdf_t
    
    All callers now have an sbdf.  Pass it down directly, rather than splitting
    into three parameters.
    
    In turn this shows that bus and devfn could never be out of bounds, so drop
    those checks too.
    
    No functional change.
    
    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/pv/ro-page-fault.c   |  4 +---
 xen/arch/x86/x86_64/mmconfig_64.c | 18 ++++++++----------
 xen/arch/x86/x86_64/pci.c         | 12 ++++++------
 xen/include/xen/pci.h             |  8 ++++----
 4 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c
index e70e09a6a6..c10541709e 100644
--- a/xen/arch/x86/pv/ro-page-fault.c
+++ b/xen/arch/x86/pv/ro-page-fault.c
@@ -331,9 +331,7 @@ static int cf_check mmcfg_intercept_write(
     offset &= 0xfff;
     if ( pci_conf_write_intercept(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bdf,
                                   offset, bytes, p_data) >= 0 )
-        pci_mmcfg_write(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bus,
-                        mmio_ctxt->sbdf.devfn, offset, bytes,
-                        *(uint32_t *)p_data);
+        pci_mmcfg_write(mmio_ctxt->sbdf, offset, bytes, *(uint32_t *)p_data);
 
     return X86EMUL_OKAY;
 }
diff --git a/xen/arch/x86/x86_64/mmconfig_64.c b/xen/arch/x86/x86_64/mmconfig_64.c
index 91b1a398e6..6477bf8b44 100644
--- a/xen/arch/x86/x86_64/mmconfig_64.c
+++ b/xen/arch/x86/x86_64/mmconfig_64.c
@@ -55,19 +55,18 @@ static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned i
      return addr + ((bus << 20) | (devfn << 12));
 }
 
-int pci_mmcfg_read(unsigned int seg, unsigned int bus,
-              unsigned int devfn, int reg, int len, u32 *value)
+int pci_mmcfg_read(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t *value)
 {
     char __iomem *addr;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
-    if (unlikely((bus > 255) || (devfn > 255) ||
-                 (reg + len > PCI_CFG_SPACE_EXP_SIZE))) {
+    if (unlikely(reg + len > PCI_CFG_SPACE_EXP_SIZE)) {
 err:        *value = -1;
         return -EINVAL;
     }
 
-    addr = pci_dev_base(seg, bus, devfn);
+    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
     if (!addr)
         goto err;
 
@@ -86,17 +85,16 @@ err:        *value = -1;
     return 0;
 }
 
-int pci_mmcfg_write(unsigned int seg, unsigned int bus,
-               unsigned int devfn, int reg, int len, u32 value)
+int pci_mmcfg_write(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t value)
 {
     char __iomem *addr;
 
     /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
-    if (unlikely((bus > 255) || (devfn > 255) ||
-                 (reg + len > PCI_CFG_SPACE_EXP_SIZE)))
+    if (unlikely(reg + len > PCI_CFG_SPACE_EXP_SIZE))
         return -EINVAL;
 
-    addr = pci_dev_base(seg, bus, devfn);
+    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
     if (!addr)
         return -EINVAL;
 
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 6298141c3c..970c010e12 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -17,7 +17,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
     if ( sbdf.seg || reg > 255 )
     {
-        pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, &value);
+        pci_mmcfg_read(sbdf, reg, 1, &value);
         return value;
     }
 
@@ -30,7 +30,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
     {
         uint32_t value;
 
-        pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, &value);
+        pci_mmcfg_read(sbdf, reg, 2, &value);
         return value;
     }
 
@@ -43,7 +43,7 @@ uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
     {
         uint32_t value;
 
-        pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, &value);
+        pci_mmcfg_read(sbdf, reg, 4, &value);
         return value;
     }
 
@@ -53,7 +53,7 @@ uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 {
     if ( sbdf.seg || reg > 255 )
-        pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 1, data);
+        pci_mmcfg_write(sbdf, reg, 1, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 3, 1, data);
 }
@@ -61,7 +61,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
     if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
-        pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
+        pci_mmcfg_write(sbdf, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
 }
@@ -69,7 +69,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
     if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
-        pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
+        pci_mmcfg_write(sbdf, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
 }
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index ade882caee..b7a35371a7 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -258,10 +258,10 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data);
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data);
 uint32_t pci_conf_read(uint32_t cf8, uint8_t offset, uint8_t bytes);
 void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data);
-int pci_mmcfg_read(unsigned int seg, unsigned int bus,
-                   unsigned int devfn, int reg, int len, u32 *value);
-int pci_mmcfg_write(unsigned int seg, unsigned int bus,
-                    unsigned int devfn, int reg, int len, u32 value);
+int pci_mmcfg_read(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t *value);
+int pci_mmcfg_write(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int len, uint32_t value);
 unsigned int pci_find_cap_offset(pci_sbdf_t sbdf, unsigned int cap);
 unsigned int pci_find_next_cap_ttl(pci_sbdf_t sbdf, unsigned int pos,
                                    const unsigned int caps[], unsigned int n,
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 05:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 05:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413934.1643819 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xkz-00084M-2s; Thu, 10 Sep 2026 05:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413934.1643819; Thu, 10 Sep 2026 05:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xkz-00084E-01; Thu, 10 Sep 2026 05:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1413934;
 Thu, 10 Sep 2026 05:55:31 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Xkx-000846-Rh
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 05:55:31 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xkx-007xnr-1c
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:31 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xkx-001PDJ-2Y
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:31 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VmEFm857SLfthxillQnl2YVzC9jaA5KK2kf4GBCiU2c=; b=KW/OnOJAASLxhFEubOLfyxPjpH
	w0ynfI6BJzk1ENUyXfN7jBkrQ+jHvRLt6lw5fCGZR+XssFl77BqMhF54Sp69KM1dAA/vE17gfbuu2
	7PHb5WhO8TmCaONwcI/zDNkuLV1WxgrlffbuYdmUdBB5z1xLueORG8dv/rAQIS4rsF2s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pci: Update pci_conf_write_intercept() to use pci_sbdf_t
Message-Id: <E1x4Xkx-001PDJ-2Y@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 05:55:31 +0000

commit f3a525c25932cfa28b29e05c4f52b424c88d766c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Sep 8 19:43:49 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/pci: Update pci_conf_write_intercept() to use pci_sbdf_t
    
    ... rather than splitting across two parameters.
    
    No functional change.
    
    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/include/asm/pci.h  |  5 ++---
 xen/arch/x86/pci.c              |  6 ++----
 xen/arch/x86/pv/emul-priv-op.c  | 10 +++++-----
 xen/arch/x86/pv/ro-page-fault.c |  3 +--
 4 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/xen/arch/x86/include/asm/pci.h b/xen/arch/x86/include/asm/pci.h
index 0b98081aea..8d8e66928d 100644
--- a/xen/arch/x86/include/asm/pci.h
+++ b/xen/arch/x86/include/asm/pci.h
@@ -36,9 +36,8 @@ struct arch_pci_dev {
     struct page_list_head pgtables_list;
 };
 
-int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
-                             unsigned int reg, unsigned int size,
-                             uint32_t *data);
+int pci_conf_write_intercept(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int size, uint32_t *data);
 int pci_msi_conf_write_intercept(struct pci_dev *pdev, unsigned int reg,
                                  unsigned int size, uint32_t *data);
 bool pci_mmcfg_decode(unsigned long mfn, unsigned int *seg,
diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index 4c27987551..0731f7e762 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -72,11 +72,9 @@ void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data)
     spin_unlock_irqrestore(&pci_config_lock, flags);
 }
 
-int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
-                             unsigned int reg, unsigned int size,
-                             uint32_t *data)
+int pci_conf_write_intercept(
+    pci_sbdf_t sbdf, unsigned int reg, unsigned int size, uint32_t *data)
 {
-    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
     int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, true);
diff --git a/xen/arch/x86/pv/emul-priv-op.c b/xen/arch/x86/pv/emul-priv-op.c
index dc21515e44..fd9b533e57 100644
--- a/xen/arch/x86/pv/emul-priv-op.c
+++ b/xen/arch/x86/pv/emul-priv-op.c
@@ -228,7 +228,7 @@ static bool admin_io_okay(unsigned int port, unsigned int bytes,
 static bool pci_cfg_ok(struct domain *currd, unsigned int start,
                        unsigned int size, uint32_t *write)
 {
-    uint32_t machine_bdf;
+    pci_sbdf_t sbdf = {}; /* Seg always 0 for IO port CFG accesses. */
 
     if ( !is_hardware_domain(currd) )
         return false;
@@ -236,12 +236,12 @@ static bool pci_cfg_ok(struct domain *currd, unsigned int start,
     if ( !CF8_ENABLED(currd->arch.pci_cf8) )
         return true;
 
-    machine_bdf = CF8_BDF(currd->arch.pci_cf8);
+    sbdf.bdf = CF8_BDF(currd->arch.pci_cf8);
     if ( write )
     {
         const unsigned long *ro_map = pci_get_ro_map(0);
 
-        if ( ro_map && test_bit(machine_bdf, ro_map) )
+        if ( ro_map && test_bit(sbdf.bdf, ro_map) )
             return false;
     }
     start |= CF8_ADDR_LO(currd->arch.pci_cf8);
@@ -259,9 +259,9 @@ static bool pci_cfg_ok(struct domain *currd, unsigned int start,
     }
 
     return !write ?
-           xsm_pci_config_permission(XSM_HOOK, currd, machine_bdf,
+           xsm_pci_config_permission(XSM_HOOK, currd, sbdf.sbdf,
                                      start, start + size - 1, false) == 0 :
-           pci_conf_write_intercept(0, machine_bdf, start, size, write) >= 0;
+           pci_conf_write_intercept(sbdf, start, size, write) >= 0;
 }
 
 static uint32_t guest_io_read(unsigned int port, unsigned int bytes,
diff --git a/xen/arch/x86/pv/ro-page-fault.c b/xen/arch/x86/pv/ro-page-fault.c
index c10541709e..34349e9437 100644
--- a/xen/arch/x86/pv/ro-page-fault.c
+++ b/xen/arch/x86/pv/ro-page-fault.c
@@ -329,8 +329,7 @@ static int cf_check mmcfg_intercept_write(
     }
 
     offset &= 0xfff;
-    if ( pci_conf_write_intercept(mmio_ctxt->sbdf.seg, mmio_ctxt->sbdf.bdf,
-                                  offset, bytes, p_data) >= 0 )
+    if ( pci_conf_write_intercept(mmio_ctxt->sbdf, offset, bytes, p_data) >= 0 )
         pci_mmcfg_write(mmio_ctxt->sbdf, offset, bytes, *(uint32_t *)p_data);
 
     return X86EMUL_OKAY;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 05:55:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 05:55:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1413935.1643822 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xl9-00087B-5b; Thu, 10 Sep 2026 05:55:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1413935.1643822; Thu, 10 Sep 2026 05:55:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4Xl9-000873-30; Thu, 10 Sep 2026 05:55:43 +0000
Received: by outflank-mailman (input) for mailman id 1413935;
 Thu, 10 Sep 2026 05:55:41 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4Xl7-00086u-Ua
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 05:55:41 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xl7-007xnv-1s
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:41 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4Xl7-001PMD-2p
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 05:55:41 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ERFrtXFdEdfeJFbVnwLkAknzw3gLFWYrXTZ2yt8EkyY=; b=uNp/Q6YLNN2LQWWy6elDxvZfpo
	b+z36LmSYUy/aNoTA8zWgEazH2CeZlZngXkVEqRVn+gnFL7xrGTVyOv/wLad7mLS1ENZi8tij3+Fq
	O1hFuQUgkHVZfX0FchDIo99nMsQ65zw7oO0i7VaGrdxFwD8PytKO63WGmc6GdSesoPCk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4Xl7-001PMD-2p@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 05:55:41 +0000

commit 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jun 16 11:47:41 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Sep 9 18:07:32 2026 +0100

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/microcode/intel.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index c45b00c6b0..425bfc1045 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -27,6 +27,7 @@
 #include <xen/string.h>
 #include <xen/xmalloc.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -273,6 +274,44 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.vfm == INTEL_GRANITERAPIDS_X &&
+         boot_cpu_data.stepping == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -365,6 +404,7 @@ static struct microcode_patch *cf_check intel_ucode_parse(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 08:33:11 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 08:33:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414151.1643935 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDP-0001CT-Hh; Thu, 10 Sep 2026 08:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414151.1643935; Thu, 10 Sep 2026 08:33:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDP-0001CL-F2; Thu, 10 Sep 2026 08:33:03 +0000
Received: by outflank-mailman (input) for mailman id 1414151;
 Thu, 10 Sep 2026 08:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4aDO-0001CF-Kt
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 08:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDN-0081N6-38
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDO-008m5F-0p
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0g2ECA8gXNBkqYrMUhg9VgFZZepNtZkABfEFg898wKE=; b=U60c1hSxjex0Y8/j9wdAzGWDYA
	tsCGVVmrhvAteZyoLMueY0I3AemMKLpGMXxpxEAFGbO4+RnC4AsYvXkbQKsqHmq4JDZ1Ac8KvgTXZ
	MuIxveto0hfSj8HiTF50vtMcSCDISDEkuvKHm/wqRlQNQgS8DEqjHWJa7fDNhANWZjQ4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86: split xen-syms/xen.efi linking rules
Message-Id: <E1x4aDO-008m5F-0p@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 08:33:02 +0000

commit da944a72fdf494c94d5e064c7d5b34558f2dbdb2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 08:59:50 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 08:59:50 2026 +0200

    x86: split xen-syms/xen.efi linking rules
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations. For xen-syms move re-usable helper rules to a new
    scripts/Makefile.link.
    
    While doing so, re-order .map file creation (which can in principle fail)
    and check-endbr.sh invocation ahead of putting in place the final image
    (which is now the result of a simple rename).
    
    Also drop --source-name= from the tools/symbols invocation which has
    --empty passed, for being meaningless there.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/Makefile     | 134 ++++++++++++++++++++++------------------------
 xen/scripts/Makefile.link |  51 ++++++++++++++++++
 2 files changed, 114 insertions(+), 71 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index b14eca98bf..ee2573c2fb 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -102,12 +102,6 @@ notes_phdrs = --notes
 endif
 endif
 
-syms-warn-dup-y := --warn-dup
-syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
-syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup
-
-orphan-handling-$(call ld-option,--orphan-handling=warn) += --orphan-handling=warn
-
 $(TARGET): TMP = $(dot-target).elf32
 $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
 	$(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET)
@@ -119,31 +113,11 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
 
 CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) --strip-debug \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) --strip-debug \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	$(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o)
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(orphan-handling-y) $(dot-target).2.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
-ifeq ($(CONFIG_XEN_IBT),y)
-	$(SHELL) $(srctree)/tools/check-endbr.sh $@
-endif
+LAST_LINKING_PASS := 2
+
+final-image-check-$(CONFIG_XEN_IBT) = $(SHELL) $(srctree)/tools/check-endbr.sh $(1)
+
+include scripts/Makefile.link
 
 $(obj)/note.o: $(TARGET)-syms
 	$(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin
@@ -191,51 +165,69 @@ note_file_option ?= $(note_file)
 
 extra-$(XEN_BUILD_PE) += efi.lds
 ifeq ($(XEN_BUILD_PE),y)
-$(TARGET).efi: $(obj)/efi/relocs-dummy.o $(obj)/efi/relocs-empty.o $(obj)/efi/mkreloc
-$(TARGET).efi: $(objtree)/prelink.o $(note_file) $(obj)/efi.lds
+
+.INTERMEDIATE: $(addprefix .$(TARGET).efi., \
+                           $(foreach n, 0 1 2, \
+                                     $(n) alt.$(n) $(n)r.o $(n)s.o $(n)r.S $(n)s.S))
+
+.$(TARGET).efi.%.o: .$(TARGET).efi.%.S
+	$(call cmd,cc_o_S)
+
+.$(TARGET).efi.1r.S: .$(TARGET).efi.0 $(if $(relocs-dummy),.$(TARGET).efi.alt.0)
+.$(TARGET).efi.2r.S: .$(TARGET).efi.1 $(if $(relocs-dummy),.$(TARGET).efi.alt.1)
+
+.$(TARGET).efi.0r.o: $(obj)/efi/relocs-dummy.o
+	ln -sf $< $@
+
+.$(TARGET).efi.%r.S: $(obj)/efi/mkreloc
+	$(MKRELOC) $(filter .$(TARGET).efi.%, $^) > $@
+
+.$(TARGET).efi.0s.S:
+	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+
+.$(TARGET).efi.1s.S: .$(TARGET).efi.0
+.$(TARGET).efi.2s.S: .$(TARGET).efi.1
+
+.$(TARGET).efi.%s.S:
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+ 	    --source-name=$(TARGET).efi.S \
+	  > $@
+
+# See above for why $(note_file) needs removing here.
+efi-objs = $(filter-out $(note_file),$(filter %.o,$^))
+
+.$(TARGET).efi.%: $(objtree)/prelink.o .$(TARGET).efi.%r.o \
+                  .$(TARGET).efi.%s.o $(note_file) $(obj)/efi.lds
+	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $(efi-objs) \
+	      --strip-debug $(note_file_option) -o $@
+
+.$(TARGET).efi.alt.%: $(objtree)/prelink.o .$(TARGET).efi.%r.o \
+                      .$(TARGET).efi.%s.o $(note_file) $(obj)/efi.lds
+	$(LD) $(call EFI_LDFLAGS,$(ALT_BASE)) -T $(obj)/efi.lds $(efi-objs) \
+	      --strip-debug $(note_file_option) -o $@
+
+.$(TARGET).efi.2: $(objtree)/prelink.o $(obj)/efi/relocs-empty.o \
+                  .$(TARGET).efi.2r.o .$(TARGET).efi.2s.o $(note_file) \
+                  $(obj)/efi.lds
+	$(call compare-symbol-tables, .$(TARGET).efi.1r.o, .$(TARGET).efi.2r.o)
+	$(call compare-symbol-tables, .$(TARGET).efi.1s.o, .$(TARGET).efi.2s.o)
+	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $(efi-objs) \
+	      $(orphan-handling-y) $(note_file_option) -o $@
+
+$(TARGET).efi: .$(TARGET).efi.2
 ifeq ($(CONFIG_DEBUG_INFO),y)
-	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug info from $(@F)"
+	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "No debug info in $(@F)"
 endif
-	$(objtree)/tools/symbols $(all_symbols) --source-name=$(@F).S --empty \
-		> $(dot-target).0s.S
-	$(MAKE) $(build)=$(@D) .$(@F).0s.o
-	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
-	          $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds $< $(relocs-dummy) \
-	                $(dot-target).0s.o $(note_file_option) --strip-debug \
-	                -o $(dot-target).$(base).0 &&) :
-	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).0) \
-		> $(dot-target).1r.S
-	$(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-                  --source-name=$(@F).S \
-		> $(dot-target).1s.S
-	$(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
-	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
-	          $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds $<  --strip-debug \
-	                $(dot-target).1r.o $(dot-target).1s.o $(note_file_option) \
-	                -o $(dot-target).$(base).1 &&) :
-	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).1) \
-		> $(dot-target).2r.S
-	$(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-                  --source-name=$(@F).S \
-		> $(dot-target).2s.S
-	$(MAKE) $(build)=$(@D) .$(@F).2r.o .$(@F).2s.o
-	$(call compare-symbol-tables, $(dot-target).1r.o, $(dot-target).2r.o)
-	$(call compare-symbol-tables, $(dot-target).1s.o, $(dot-target).2s.o)
-	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $< $(obj)/efi/relocs-empty.o \
-	      $(dot-target).2r.o $(dot-target).2s.o $(orphan-handling-y) \
-	      $(note_file_option) -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+	  > $@.map
 ifeq ($(CONFIG_DEBUG_INFO),y)
-	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ $@.elf
+	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $< $@.elf
 endif
+	$(call final-image-check-y, $<)
+	mv $< $@
 	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
-ifeq ($(CONFIG_XEN_IBT),y)
-	$(SHELL) $(srctree)/tools/check-endbr.sh $@
-endif
 else
 $(TARGET).efi: FORCE
 	rm -f $@
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
new file mode 100644
index 0000000000..6d463a8514
--- /dev/null
+++ b/xen/scripts/Makefile.link
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0
+# ==========================================================================
+# Helper rules for linking xen-syms
+# ==========================================================================
+
+syms-warn-dup-y := --warn-dup
+syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
+syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup
+
+orphan-handling-$(call ld-option,--orphan-handling=warn) := --orphan-handling=warn
+
+final-image-check-y ?= true
+
+.INTERMEDIATE: $(addprefix .$(TARGET)-syms.,$(foreach n,0 1 2 3,$(n) $(n).o $(n).S))
+
+.$(TARGET)-syms.%.o: .$(TARGET)-syms.%.S
+	$(call cmd,cc_o_S)
+
+.$(TARGET)-syms.0.S:
+	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+
+.$(TARGET)-syms.1.S: .$(TARGET)-syms.0
+.$(TARGET)-syms.2.S: .$(TARGET)-syms.1
+.$(TARGET)-syms.3.S: .$(TARGET)-syms.2
+
+.$(TARGET)-syms.%.S:
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+	    $(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
+	  > $@
+
+.$(TARGET)-syms.%: $(objtree)/prelink.o .$(TARGET)-syms.%.o $(obj)/xen.lds
+	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
+	      $(build_id_linker) --strip-debug -o $@
+
+.$(TARGET)-syms.$(LAST_LINKING_PASS): $(objtree)/prelink.o \
+                                      .$(TARGET)-syms.$(LAST_LINKING_PASS).o \
+                                      $(obj)/xen.lds
+	$(call compare-symbol-tables, \
+	       .$(TARGET)-syms.$(shell expr $(LAST_LINKING_PASS) - 1).o, \
+	       .$(TARGET)-syms.$(LAST_LINKING_PASS).o)
+	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
+	      $(build_id_linker) $(orphan-handling-y) -o $@
+
+$(TARGET)-syms: .$(TARGET)-syms.$(LAST_LINKING_PASS)
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+	  > $@.map
+	$(call final-image-check-y, $<)
+	mv $< $@
+	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 08:33:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 08:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414152.1643939 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDZ-0001Dw-JT; Thu, 10 Sep 2026 08:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414152.1643939; Thu, 10 Sep 2026 08:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDZ-0001Do-GU; Thu, 10 Sep 2026 08:33:13 +0000
Received: by outflank-mailman (input) for mailman id 1414152;
 Thu, 10 Sep 2026 08:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4aDY-0001Dc-E8
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 08:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDY-0081NA-0E
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDY-008mfn-17
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nZWQtkoGoG0iLe2n5gOekM2UHKFqSCfYb62iVRjtBrg=; b=gFTzB1gJCMi8QNmVIF0Lk7sG+A
	sTlORw5xJUVEcd6fg8gAyRzqjHBXnEDN2id6nya66nkqWb45r4r8pEaZT03eIHbH2nF703qupxgLK
	Ng6z4VwnFgnSo3t1SyBORVlCOW6u7iACiUEB3qWCvp/2N3E+r/Jt8kXzVQ96uXzl0Jmk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] PPC: split xen-syms linking rule
Message-Id: <E1x4aDY-008mfn-17@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 08:33:12 +0000

commit 1b12a206318758b94fc80b835de6fc0adc328ca6
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 09:00:16 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:00:16 2026 +0200

    PPC: split xen-syms linking rule
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    [re-]using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations.
    
    By re-using the generic rules introduced when the respective x86 rule was
    split,
    - the .map file now isn't created after the final binary anymore,
    - --strip-debug is passed to $(LD) during early linking passes (for
      consistency the option is also explicitly added to the optional linking
      pass rule),
    - CONFIG_{SUPPRESS_DUPLICATE_SYMBOL_WARNINGS,ENFORCE_UNIQUE_SYMBOLS} are
      now properly respected.
    Orphan section checking, otoh, is getting suppressed for now, until the
    about a dozen warnings which would result have been taken care of.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/arch/ppc/Makefile | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/xen/arch/ppc/Makefile b/xen/arch/ppc/Makefile
index 75215e07a8..3342c2249a 100644
--- a/xen/arch/ppc/Makefile
+++ b/xen/arch/ppc/Makefile
@@ -11,28 +11,12 @@ obj-y += tlb-radix.o
 $(TARGET): $(TARGET)-syms
 	cp -f $< $@
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	$(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o)
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).2.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
+LAST_LINKING_PASS := 2
+
+include scripts/Makefile.link
+
+# Suppress orphan section checking for the time being.
+orphan-handling-y :=
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 08:33:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 08:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414153.1643943 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDj-0001G3-KV; Thu, 10 Sep 2026 08:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414153.1643943; Thu, 10 Sep 2026 08:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDj-0001Fv-Ho; Thu, 10 Sep 2026 08:33:23 +0000
Received: by outflank-mailman (input) for mailman id 1414153;
 Thu, 10 Sep 2026 08:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4aDi-0001Fp-Gk
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 08:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDi-0081NH-0W
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDi-008nGG-1S
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=cXl1AaIKHLKIPh817VjFZ3EA1PTjghUnpWp9b2FVIU0=; b=Ae6xw8HoROPvXYqcOUvYKFVTav
	WocbPCgAaE3Xq5urpNtP8iJLnQq1tbnHXts68fVupVx6FbErdYDF+fX3wTEjwmhZMOZYfvGjxtzBE
	6QV/79nfzgeor8pB7QSApcbEeh0G4mmjDoQsZI3B9sKTNjkwU7t+XUtGjwu3TVrLiplk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/PCI: use pci_sbdf_t also for pci_dev_base()
Message-Id: <E1x4aDi-008nGG-1S@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 08:33:22 +0000

commit c3b570e1b5fca14adc47070f5a989588ae1120ce
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 09:00:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:00:55 2026 +0200

    x86/PCI: use pci_sbdf_t also for pci_dev_base()
    
    No need to pass three arguments when both callers already hold SBDF in
    their hands.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_64/mmconfig_64.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/x86_64/mmconfig_64.c b/xen/arch/x86/x86_64/mmconfig_64.c
index 6477bf8b44..05b9abee5a 100644
--- a/xen/arch/x86/x86_64/mmconfig_64.c
+++ b/xen/arch/x86/x86_64/mmconfig_64.c
@@ -45,14 +45,15 @@ static char __iomem *get_virt(unsigned int seg, unsigned int *bus)
     return NULL;
 }
 
-static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
+static char __iomem *pci_dev_base(pci_sbdf_t sbdf)
 {
-    char __iomem *addr;
+    unsigned int bus = sbdf.bus;
+    char __iomem *addr = get_virt(sbdf.seg, &bus);
 
-    addr = get_virt(seg, &bus);
     if (!addr)
         return NULL;
-     return addr + ((bus << 20) | (devfn << 12));
+
+    return addr + ((bus << 20) | (sbdf.devfn << 12));
 }
 
 int pci_mmcfg_read(
@@ -66,7 +67,7 @@ err:        *value = -1;
         return -EINVAL;
     }
 
-    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
+    addr = pci_dev_base(sbdf);
     if (!addr)
         goto err;
 
@@ -94,7 +95,7 @@ int pci_mmcfg_write(
     if (unlikely(reg + len > PCI_CFG_SPACE_EXP_SIZE))
         return -EINVAL;
 
-    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
+    addr = pci_dev_base(sbdf);
     if (!addr)
         return -EINVAL;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 08:33:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 08:33:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414154.1643948 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDt-0001JF-M9; Thu, 10 Sep 2026 08:33:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414154.1643948; Thu, 10 Sep 2026 08:33:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aDt-0001J7-JD; Thu, 10 Sep 2026 08:33:33 +0000
Received: by outflank-mailman (input) for mailman id 1414154;
 Thu, 10 Sep 2026 08:33:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4aDs-0001J1-JQ
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 08:33:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDs-0081NO-0n
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aDs-008npw-1j
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=jgXieJf4cZi9u1j9NQAJrodgNbKsfVtE/+xFakzQh+s=; b=l1t8S0wfMIMpgzBLSv1/rzyoho
	eb0W6noyybF692B8ji9nlAwjVBW4saDud+SPfKq3l6zszZeytP176WOLsE8R/7XPwi1k/qsarEDJ9
	A6Qh6zpVOQ36/F5p6OQT1AXAuN6/1/lDbIyATLR/5+1pfmwyL8pcprhUJNJPQHAW6JkI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/EFI: adjust efi_multiboot2_prelude() to comply to Misra rule 18.2
Message-Id: <E1x4aDs-008npw-1j@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 08:33:32 +0000

commit 04d4312440e2c0ea9410eb13a42bdfb38e1493b1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 09:01:30 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:01:30 2026 +0200

    x86/EFI: adjust efi_multiboot2_prelude() to comply to Misra rule 18.2
    
    While casting to pointer types may be more natural there, the subtraction
    then ends up violating "Subtraction between pointers shall only be applied
    to pointers that address elements of the same array". Use unsigned long
    arithmetic instead.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/arch/x86/efi/mbi2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/efi/mbi2.c b/xen/arch/x86/efi/mbi2.c
index d2f0f0ee61..996eafa03d 100644
--- a/xen/arch/x86/efi/mbi2.c
+++ b/xen/arch/x86/efi/mbi2.c
@@ -13,7 +13,7 @@ efi_multiboot2_prelude(uint32_t magic, const multiboot2_fixed_t *mbi)
     EFI_HANDLE ImageHandle = NULL;
     EFI_SYSTEM_TABLE *SystemTable = NULL;
     const char *cmdline = NULL;
-    const void *const mbi_raw = (const void *)mbi;
+    unsigned long mbi_raw = (unsigned long)mbi;
     bool have_bs = false;
 
     if ( magic != MULTIBOOT2_BOOTLOADER_MAGIC )
@@ -22,10 +22,10 @@ efi_multiboot2_prelude(uint32_t magic, const multiboot2_fixed_t *mbi)
     /* Skip Multiboot2 information fixed part. */
     tag = _p(ROUNDUP((unsigned long)(mbi + 1), MULTIBOOT2_TAG_ALIGN));
 
-    for ( ; (const void *)(tag + 1) - mbi_raw <= mbi->total_size &&
+    for ( ; (unsigned long)(tag + 1) - mbi_raw <= mbi->total_size &&
             tag->type != MULTIBOOT2_TAG_TYPE_END &&
             tag->size >= sizeof(*tag) &&
-            (const void *)tag + tag->size - mbi_raw <= mbi->total_size;
+            (unsigned long)tag + tag->size - mbi_raw <= mbi->total_size;
           tag = _p(ROUNDUP((unsigned long)tag + tag->size,
                    MULTIBOOT2_TAG_ALIGN)) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 08:33:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 08:33:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414156.1643950 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aE3-0001Nf-Og; Thu, 10 Sep 2026 08:33:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414156.1643950; Thu, 10 Sep 2026 08:33:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4aE3-0001NX-M2; Thu, 10 Sep 2026 08:33:43 +0000
Received: by outflank-mailman (input) for mailman id 1414156;
 Thu, 10 Sep 2026 08:33:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4aE2-0001N6-Mu
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 08:33:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aE2-0081NZ-16
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4aE2-008oOi-22
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 08:33:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=mBRgEePIvDQBEm8+j2X8OcXXpyIxdIRV7IaFJOypnKo=; b=mPduF7gVM6dE3+S0NoRh9YlXAH
	junbjeAo7bLmTlcOfnZIgn3+LuoyQkAvLVpMByH7XMbsoPMYM62h0gescIG3efw2NUmNwwSKk0p4K
	/ZURymZM7yczMZYDgK6u7aLoc53NsMpYGaSam7X3ceqDDbvx0g85173D4vDzQ9+Y/+CQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/dom0less: turn max_init_domid into a common variable
Message-Id: <E1x4aE2-008oOi-22@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 08:33:42 +0000

commit 2f73bc7c06398f95a4d9f0b89d52ba22c7815870
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Thu Sep 10 09:02:08 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:02:08 2026 +0200

    xen/dom0less: turn max_init_domid into a common variable
    
    Until now every architecture carried its own notion of max_init_domid:
    Arm defined a real variable (declared in asm/setup.h, defined in
    setup.c), while ppc, riscv and x86 each provided a "#define
    max_init_domid (0)" stub in their asm/setup.h. This duplicated the same
    declaration across all arches and placed a purely dom0less concept in
    arch setup headers.
    
    Now that the dom0less build code lives in common (xen/common/
    device-tree/dom0less-build.c sets max_init_domid, and the console
    serial-input switcher reads it), there is no reason for the symbol to be
    per-arch. Provide a single declaration in <xen/dom0less-build.h>, with
    the !CONFIG_DOM0LESS_BOOT stub kept there as well, so there is one source
    of truth and the arch headers no longer need to mention it. Update
    console.c to include <xen/dom0less-build.h> for the declaration instead
    of relying on asm/setup.h, and drop the now unneeded <asm/setup.h>
    include.
    
    Place the definition in xen/common/domid.c rather than in dom0less-
    build.c. The latter is built as dom0less-build.init.o, i.e. the whole
    object is relocated into the .init.* sections and freed after boot,
    whereas max_init_domid must outlive boot because it is read at runtime
    by the console serial-input switcher. domid.c is always linked (obj-y)
    and resides in regular (non-init) sections, so it is a correct home for
    the variable. It is marked __ro_after_init since it is only updated
    while creating boot-time domains and read-only afterwards, and guarded
    by CONFIG_DOM0LESS_BOOT as domid.c itself is unconditional.
    
    While at it, make <xen/dom0less-build.h> self-contained: it includes
    <public/xen.h>, which uses the fixed-width types provided by
    <xen/types.h>, so include the latter explicitly rather than relying on
    the includer having pulled it in first. This becomes necessary as soon
    as <xen/dom0less-build.h> comes first in an alphabetically sorted
    include list, as it now does in domid.c.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/include/asm/setup.h   | 2 --
 xen/arch/arm/setup.c               | 2 --
 xen/arch/ppc/include/asm/setup.h   | 2 --
 xen/arch/riscv/include/asm/setup.h | 2 --
 xen/arch/x86/include/asm/setup.h   | 2 --
 xen/common/domid.c                 | 5 +++++
 xen/drivers/char/console.c         | 2 +-
 xen/include/xen/dom0less-build.h   | 8 ++++++++
 8 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.h
index 0adfa4993a..2af7805125 100644
--- a/xen/arch/arm/include/asm/setup.h
+++ b/xen/arch/arm/include/asm/setup.h
@@ -25,8 +25,6 @@ struct map_range_data
     struct rangeset *irq_ranges;
 };
 
-extern domid_t max_init_domid;
-
 void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len);
 
 size_t estimate_efi_size(unsigned int mem_nr_banks);
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 6310a47d68..86532d0a35 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -62,8 +62,6 @@ struct cpuinfo_arm __read_mostly system_cpuinfo;
 bool __read_mostly acpi_disabled;
 #endif
 
-domid_t __read_mostly max_init_domid;
-
 static __used void noreturn init_done(void)
 {
     /* Must be done past setting system_state. */
diff --git a/xen/arch/ppc/include/asm/setup.h b/xen/arch/ppc/include/asm/setup.h
index e4f64879b6..956fa6985a 100644
--- a/xen/arch/ppc/include/asm/setup.h
+++ b/xen/arch/ppc/include/asm/setup.h
@@ -1,6 +1,4 @@
 #ifndef __ASM_PPC_SETUP_H__
 #define __ASM_PPC_SETUP_H__
 
-#define max_init_domid (0)
-
 #endif /* __ASM_PPC_SETUP_H__ */
diff --git a/xen/arch/riscv/include/asm/setup.h b/xen/arch/riscv/include/asm/setup.h
index 2215894cfb..73ce2f2933 100644
--- a/xen/arch/riscv/include/asm/setup.h
+++ b/xen/arch/riscv/include/asm/setup.h
@@ -5,8 +5,6 @@
 
 #include <xen/types.h>
 
-#define max_init_domid (0)
-
 void setup_mm(void);
 
 void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len);
diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h
index b01e83a8ed..5925c5f39c 100644
--- a/xen/arch/x86/include/asm/setup.h
+++ b/xen/arch/x86/include/asm/setup.h
@@ -68,6 +68,4 @@ extern bool opt_dom0_verbose;
 extern bool opt_dom0_cpuid_faulting;
 extern bool opt_dom0_msr_relaxed;
 
-#define max_init_domid (0)
-
 #endif
diff --git a/xen/common/domid.c b/xen/common/domid.c
index b0258e477c..c0cb025609 100644
--- a/xen/common/domid.c
+++ b/xen/common/domid.c
@@ -8,8 +8,13 @@
  * Copyright 2025 Ford Motor Company
  */
 
+#include <xen/dom0less-build.h>
 #include <xen/domain.h>
 
+#ifdef CONFIG_DOM0LESS_BOOT
+domid_t __ro_after_init max_init_domid;
+#endif
+
 static DEFINE_SPINLOCK(domid_lock);
 static DECLARE_BITMAP(domid_bitmap, DOMID_FIRST_RESERVED);
 
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index fcacf37c52..e4df0bbc2e 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -30,7 +30,7 @@
 #include <xen/early_printk.h>
 #include <xen/warning.h>
 #include <xen/pv_console.h>
-#include <asm/setup.h>
+#include <xen/dom0less-build.h>
 #include <xen/sections.h>
 #include <xen/consoled.h>
 
diff --git a/xen/include/xen/dom0less-build.h b/xen/include/xen/dom0less-build.h
index 4118dec76c..75bfaa185f 100644
--- a/xen/include/xen/dom0less-build.h
+++ b/xen/include/xen/dom0less-build.h
@@ -4,6 +4,9 @@
 #define XEN_DOM0LESS_BUILD_H
 
 #include <xen/stdbool.h>
+#include <xen/types.h>
+
+#include <public/xen.h>
 
 struct domain;
 
@@ -13,6 +16,9 @@ struct boot_domain;
 struct dt_device_node;
 struct kernel_info;
 
+/* Highest domain ID assigned to a boot-time (dom0less) domain. */
+extern domid_t max_init_domid;
+
 /*
  * List of possible features for dom0less domUs
  *
@@ -72,6 +78,8 @@ static inline bool is_dom0less_mode(void)
 }
 static inline void set_xs_domain(struct domain *d) {}
 
+#define max_init_domid 0
+
 #endif /* CONFIG_DOM0LESS_BOOT */
 
 #endif /* __ASM_GENERIC_DOM0LESS_BUILD_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 09:55:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 09:55:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414300.1644082 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bUl-000255-HL; Thu, 10 Sep 2026 09:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414300.1644082; Thu, 10 Sep 2026 09:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bUl-00024x-EA; Thu, 10 Sep 2026 09:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1414300;
 Thu, 10 Sep 2026 09:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bUk-00024r-C2
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 09:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bUj-0083F9-1t
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bUj-00EypZ-2p
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eHGWZgx789cbwxYfSiKclJ2zBG/IEjWfELkYCXVUJvA=; b=e+Z8EGjOwhhWBir8QbiPklxbcb
	BgB+5feBV51vnCVCVumrYUszt/L8p9HTwD6eHgpP8jk5vEx9abxscAraLDiFloTUmdv6h2/7osUc0
	7alAyb2C3YVpgNm/NX1gVZHSIha1QEE4HbUY/uW4swVzCbWEV09TRbw8wTw+WQjzhOLM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86: split xen-syms/xen.efi linking rules
Message-Id: <E1x4bUj-00EypZ-2p@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 09:55:01 +0000

commit da944a72fdf494c94d5e064c7d5b34558f2dbdb2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 08:59:50 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 08:59:50 2026 +0200

    x86: split xen-syms/xen.efi linking rules
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations. For xen-syms move re-usable helper rules to a new
    scripts/Makefile.link.
    
    While doing so, re-order .map file creation (which can in principle fail)
    and check-endbr.sh invocation ahead of putting in place the final image
    (which is now the result of a simple rename).
    
    Also drop --source-name= from the tools/symbols invocation which has
    --empty passed, for being meaningless there.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/Makefile     | 134 ++++++++++++++++++++++------------------------
 xen/scripts/Makefile.link |  51 ++++++++++++++++++
 2 files changed, 114 insertions(+), 71 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index b14eca98bf..ee2573c2fb 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -102,12 +102,6 @@ notes_phdrs = --notes
 endif
 endif
 
-syms-warn-dup-y := --warn-dup
-syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
-syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup
-
-orphan-handling-$(call ld-option,--orphan-handling=warn) += --orphan-handling=warn
-
 $(TARGET): TMP = $(dot-target).elf32
 $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
 	$(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET)
@@ -119,31 +113,11 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
 
 CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) --strip-debug \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) --strip-debug \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	$(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o)
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(orphan-handling-y) $(dot-target).2.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
-ifeq ($(CONFIG_XEN_IBT),y)
-	$(SHELL) $(srctree)/tools/check-endbr.sh $@
-endif
+LAST_LINKING_PASS := 2
+
+final-image-check-$(CONFIG_XEN_IBT) = $(SHELL) $(srctree)/tools/check-endbr.sh $(1)
+
+include scripts/Makefile.link
 
 $(obj)/note.o: $(TARGET)-syms
 	$(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin
@@ -191,51 +165,69 @@ note_file_option ?= $(note_file)
 
 extra-$(XEN_BUILD_PE) += efi.lds
 ifeq ($(XEN_BUILD_PE),y)
-$(TARGET).efi: $(obj)/efi/relocs-dummy.o $(obj)/efi/relocs-empty.o $(obj)/efi/mkreloc
-$(TARGET).efi: $(objtree)/prelink.o $(note_file) $(obj)/efi.lds
+
+.INTERMEDIATE: $(addprefix .$(TARGET).efi., \
+                           $(foreach n, 0 1 2, \
+                                     $(n) alt.$(n) $(n)r.o $(n)s.o $(n)r.S $(n)s.S))
+
+.$(TARGET).efi.%.o: .$(TARGET).efi.%.S
+	$(call cmd,cc_o_S)
+
+.$(TARGET).efi.1r.S: .$(TARGET).efi.0 $(if $(relocs-dummy),.$(TARGET).efi.alt.0)
+.$(TARGET).efi.2r.S: .$(TARGET).efi.1 $(if $(relocs-dummy),.$(TARGET).efi.alt.1)
+
+.$(TARGET).efi.0r.o: $(obj)/efi/relocs-dummy.o
+	ln -sf $< $@
+
+.$(TARGET).efi.%r.S: $(obj)/efi/mkreloc
+	$(MKRELOC) $(filter .$(TARGET).efi.%, $^) > $@
+
+.$(TARGET).efi.0s.S:
+	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+
+.$(TARGET).efi.1s.S: .$(TARGET).efi.0
+.$(TARGET).efi.2s.S: .$(TARGET).efi.1
+
+.$(TARGET).efi.%s.S:
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+ 	    --source-name=$(TARGET).efi.S \
+	  > $@
+
+# See above for why $(note_file) needs removing here.
+efi-objs = $(filter-out $(note_file),$(filter %.o,$^))
+
+.$(TARGET).efi.%: $(objtree)/prelink.o .$(TARGET).efi.%r.o \
+                  .$(TARGET).efi.%s.o $(note_file) $(obj)/efi.lds
+	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $(efi-objs) \
+	      --strip-debug $(note_file_option) -o $@
+
+.$(TARGET).efi.alt.%: $(objtree)/prelink.o .$(TARGET).efi.%r.o \
+                      .$(TARGET).efi.%s.o $(note_file) $(obj)/efi.lds
+	$(LD) $(call EFI_LDFLAGS,$(ALT_BASE)) -T $(obj)/efi.lds $(efi-objs) \
+	      --strip-debug $(note_file_option) -o $@
+
+.$(TARGET).efi.2: $(objtree)/prelink.o $(obj)/efi/relocs-empty.o \
+                  .$(TARGET).efi.2r.o .$(TARGET).efi.2s.o $(note_file) \
+                  $(obj)/efi.lds
+	$(call compare-symbol-tables, .$(TARGET).efi.1r.o, .$(TARGET).efi.2r.o)
+	$(call compare-symbol-tables, .$(TARGET).efi.1s.o, .$(TARGET).efi.2s.o)
+	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $(efi-objs) \
+	      $(orphan-handling-y) $(note_file_option) -o $@
+
+$(TARGET).efi: .$(TARGET).efi.2
 ifeq ($(CONFIG_DEBUG_INFO),y)
-	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug info from $(@F)"
+	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "No debug info in $(@F)"
 endif
-	$(objtree)/tools/symbols $(all_symbols) --source-name=$(@F).S --empty \
-		> $(dot-target).0s.S
-	$(MAKE) $(build)=$(@D) .$(@F).0s.o
-	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
-	          $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds $< $(relocs-dummy) \
-	                $(dot-target).0s.o $(note_file_option) --strip-debug \
-	                -o $(dot-target).$(base).0 &&) :
-	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).0) \
-		> $(dot-target).1r.S
-	$(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-                  --source-name=$(@F).S \
-		> $(dot-target).1s.S
-	$(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
-	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
-	          $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds $<  --strip-debug \
-	                $(dot-target).1r.o $(dot-target).1s.o $(note_file_option) \
-	                -o $(dot-target).$(base).1 &&) :
-	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).1) \
-		> $(dot-target).2r.S
-	$(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-                  --source-name=$(@F).S \
-		> $(dot-target).2s.S
-	$(MAKE) $(build)=$(@D) .$(@F).2r.o .$(@F).2s.o
-	$(call compare-symbol-tables, $(dot-target).1r.o, $(dot-target).2r.o)
-	$(call compare-symbol-tables, $(dot-target).1s.o, $(dot-target).2s.o)
-	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $< $(obj)/efi/relocs-empty.o \
-	      $(dot-target).2r.o $(dot-target).2s.o $(orphan-handling-y) \
-	      $(note_file_option) -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+	  > $@.map
 ifeq ($(CONFIG_DEBUG_INFO),y)
-	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ $@.elf
+	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $< $@.elf
 endif
+	$(call final-image-check-y, $<)
+	mv $< $@
 	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
-ifeq ($(CONFIG_XEN_IBT),y)
-	$(SHELL) $(srctree)/tools/check-endbr.sh $@
-endif
 else
 $(TARGET).efi: FORCE
 	rm -f $@
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
new file mode 100644
index 0000000000..6d463a8514
--- /dev/null
+++ b/xen/scripts/Makefile.link
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0
+# ==========================================================================
+# Helper rules for linking xen-syms
+# ==========================================================================
+
+syms-warn-dup-y := --warn-dup
+syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
+syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup
+
+orphan-handling-$(call ld-option,--orphan-handling=warn) := --orphan-handling=warn
+
+final-image-check-y ?= true
+
+.INTERMEDIATE: $(addprefix .$(TARGET)-syms.,$(foreach n,0 1 2 3,$(n) $(n).o $(n).S))
+
+.$(TARGET)-syms.%.o: .$(TARGET)-syms.%.S
+	$(call cmd,cc_o_S)
+
+.$(TARGET)-syms.0.S:
+	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+
+.$(TARGET)-syms.1.S: .$(TARGET)-syms.0
+.$(TARGET)-syms.2.S: .$(TARGET)-syms.1
+.$(TARGET)-syms.3.S: .$(TARGET)-syms.2
+
+.$(TARGET)-syms.%.S:
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+	    $(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
+	  > $@
+
+.$(TARGET)-syms.%: $(objtree)/prelink.o .$(TARGET)-syms.%.o $(obj)/xen.lds
+	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
+	      $(build_id_linker) --strip-debug -o $@
+
+.$(TARGET)-syms.$(LAST_LINKING_PASS): $(objtree)/prelink.o \
+                                      .$(TARGET)-syms.$(LAST_LINKING_PASS).o \
+                                      $(obj)/xen.lds
+	$(call compare-symbol-tables, \
+	       .$(TARGET)-syms.$(shell expr $(LAST_LINKING_PASS) - 1).o, \
+	       .$(TARGET)-syms.$(LAST_LINKING_PASS).o)
+	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
+	      $(build_id_linker) $(orphan-handling-y) -o $@
+
+$(TARGET)-syms: .$(TARGET)-syms.$(LAST_LINKING_PASS)
+	$(NM) -pa --format=sysv $< \
+	  | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+	  > $@.map
+	$(call final-image-check-y, $<)
+	mv $< $@
+	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 09:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 09:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414302.1644094 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bUv-0002Js-T1; Thu, 10 Sep 2026 09:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414302.1644094; Thu, 10 Sep 2026 09:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bUv-0002Jk-QY; Thu, 10 Sep 2026 09:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1414302;
 Thu, 10 Sep 2026 09:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bUu-0002JM-17
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 09:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bUt-0083FO-2C
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bUt-00Ezbb-37
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eB0AYh1cTe8w1Bv1j7BJrLhyQ7ttvxs8Q9waLWLfpiU=; b=3QfZIqeJ86iovi/NEBOVOZRJg2
	aL3srxt1h6lqvw6tpG0m4lynEhysqAM4OlRQ75fO6vQUPf0JH4u+0tWZOMnfHGZtDtFhLsTOQ/Y0w
	9bGNis7bel4KMyNbKZrb0IB22FoFVDTkMSU3mOXdtLqkBWHf4cz5XHnJChHyCDnVCu3k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] PPC: split xen-syms linking rule
Message-Id: <E1x4bUt-00Ezbb-37@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 09:55:11 +0000

commit 1b12a206318758b94fc80b835de6fc0adc328ca6
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 09:00:16 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:00:16 2026 +0200

    PPC: split xen-syms linking rule
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    [re-]using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations.
    
    By re-using the generic rules introduced when the respective x86 rule was
    split,
    - the .map file now isn't created after the final binary anymore,
    - --strip-debug is passed to $(LD) during early linking passes (for
      consistency the option is also explicitly added to the optional linking
      pass rule),
    - CONFIG_{SUPPRESS_DUPLICATE_SYMBOL_WARNINGS,ENFORCE_UNIQUE_SYMBOLS} are
      now properly respected.
    Orphan section checking, otoh, is getting suppressed for now, until the
    about a dozen warnings which would result have been taken care of.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/arch/ppc/Makefile | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/xen/arch/ppc/Makefile b/xen/arch/ppc/Makefile
index 75215e07a8..3342c2249a 100644
--- a/xen/arch/ppc/Makefile
+++ b/xen/arch/ppc/Makefile
@@ -11,28 +11,12 @@ obj-y += tlb-radix.o
 $(TARGET): $(TARGET)-syms
 	cp -f $< $@
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	$(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o)
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).2.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
+LAST_LINKING_PASS := 2
+
+include scripts/Makefile.link
+
+# Suppress orphan section checking for the time being.
+orphan-handling-y :=
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 09:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 09:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414303.1644097 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bV5-0002Nq-UW; Thu, 10 Sep 2026 09:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414303.1644097; Thu, 10 Sep 2026 09:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bV5-0002Ni-Rt; Thu, 10 Sep 2026 09:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1414303;
 Thu, 10 Sep 2026 09:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bV4-0002Mr-40
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 09:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bV3-0083FV-2U
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bV4-00F0Th-0C
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PeIQilGhKy1XWOI1VdtGqpwjvYSOq3xcRGBa2sVjD8k=; b=MIfvikOg1v1dOZ1JdNCB7YGtqR
	pgg1xGl2JZzLy0p7Z/W1t+bXBLc4efHWX7NRjSUGJWlqZa3BNBT594Sy40DHfsrgWn8VFEqo2wS0n
	UmF1J6X+qgRQEASvIxK1sGKiusq+7CYm59A3h4j6MPIV2zx4f0uLVEFBV6ea0AUW7HSc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/PCI: use pci_sbdf_t also for pci_dev_base()
Message-Id: <E1x4bV4-00F0Th-0C@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 09:55:22 +0000

commit c3b570e1b5fca14adc47070f5a989588ae1120ce
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 09:00:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:00:55 2026 +0200

    x86/PCI: use pci_sbdf_t also for pci_dev_base()
    
    No need to pass three arguments when both callers already hold SBDF in
    their hands.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/x86_64/mmconfig_64.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/x86_64/mmconfig_64.c b/xen/arch/x86/x86_64/mmconfig_64.c
index 6477bf8b44..05b9abee5a 100644
--- a/xen/arch/x86/x86_64/mmconfig_64.c
+++ b/xen/arch/x86/x86_64/mmconfig_64.c
@@ -45,14 +45,15 @@ static char __iomem *get_virt(unsigned int seg, unsigned int *bus)
     return NULL;
 }
 
-static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
+static char __iomem *pci_dev_base(pci_sbdf_t sbdf)
 {
-    char __iomem *addr;
+    unsigned int bus = sbdf.bus;
+    char __iomem *addr = get_virt(sbdf.seg, &bus);
 
-    addr = get_virt(seg, &bus);
     if (!addr)
         return NULL;
-     return addr + ((bus << 20) | (devfn << 12));
+
+    return addr + ((bus << 20) | (sbdf.devfn << 12));
 }
 
 int pci_mmcfg_read(
@@ -66,7 +67,7 @@ err:        *value = -1;
         return -EINVAL;
     }
 
-    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
+    addr = pci_dev_base(sbdf);
     if (!addr)
         goto err;
 
@@ -94,7 +95,7 @@ int pci_mmcfg_write(
     if (unlikely(reg + len > PCI_CFG_SPACE_EXP_SIZE))
         return -EINVAL;
 
-    addr = pci_dev_base(sbdf.seg, sbdf.bus, sbdf.devfn);
+    addr = pci_dev_base(sbdf);
     if (!addr)
         return -EINVAL;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 09:55:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 09:55:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414305.1644101 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bVG-0002Tb-00; Thu, 10 Sep 2026 09:55:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414305.1644101; Thu, 10 Sep 2026 09:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bVF-0002TT-TC; Thu, 10 Sep 2026 09:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1414305;
 Thu, 10 Sep 2026 09:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bVE-0002So-6x
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 09:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bVD-0083FZ-2m
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bVE-00F1Oj-0U
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=20lJrmwIrpUrESVcR41HX0/NkKh+cP5zevs+krHClok=; b=3PUQZBiJlUMhILtFtZIHVF7jVI
	NCEVNdWQTlDgaBGepV61k9hDIreL2jt15psFlxE9jJePmBMwCxfr6ubL2xt1N8xQkMHQbw29rM2jG
	wWh5Cpp4HL+HXgEzsMY7fIt4cvkeBV7b+94vt5MHetndYv915EUVXAMfIhJUxpQ1W58I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/EFI: adjust efi_multiboot2_prelude() to comply to Misra rule 18.2
Message-Id: <E1x4bVE-00F1Oj-0U@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 09:55:32 +0000

commit 04d4312440e2c0ea9410eb13a42bdfb38e1493b1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 09:01:30 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:01:30 2026 +0200

    x86/EFI: adjust efi_multiboot2_prelude() to comply to Misra rule 18.2
    
    While casting to pointer types may be more natural there, the subtraction
    then ends up violating "Subtraction between pointers shall only be applied
    to pointers that address elements of the same array". Use unsigned long
    arithmetic instead.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/arch/x86/efi/mbi2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/efi/mbi2.c b/xen/arch/x86/efi/mbi2.c
index d2f0f0ee61..996eafa03d 100644
--- a/xen/arch/x86/efi/mbi2.c
+++ b/xen/arch/x86/efi/mbi2.c
@@ -13,7 +13,7 @@ efi_multiboot2_prelude(uint32_t magic, const multiboot2_fixed_t *mbi)
     EFI_HANDLE ImageHandle = NULL;
     EFI_SYSTEM_TABLE *SystemTable = NULL;
     const char *cmdline = NULL;
-    const void *const mbi_raw = (const void *)mbi;
+    unsigned long mbi_raw = (unsigned long)mbi;
     bool have_bs = false;
 
     if ( magic != MULTIBOOT2_BOOTLOADER_MAGIC )
@@ -22,10 +22,10 @@ efi_multiboot2_prelude(uint32_t magic, const multiboot2_fixed_t *mbi)
     /* Skip Multiboot2 information fixed part. */
     tag = _p(ROUNDUP((unsigned long)(mbi + 1), MULTIBOOT2_TAG_ALIGN));
 
-    for ( ; (const void *)(tag + 1) - mbi_raw <= mbi->total_size &&
+    for ( ; (unsigned long)(tag + 1) - mbi_raw <= mbi->total_size &&
             tag->type != MULTIBOOT2_TAG_TYPE_END &&
             tag->size >= sizeof(*tag) &&
-            (const void *)tag + tag->size - mbi_raw <= mbi->total_size;
+            (unsigned long)tag + tag->size - mbi_raw <= mbi->total_size;
           tag = _p(ROUNDUP((unsigned long)tag + tag->size,
                    MULTIBOOT2_TAG_ALIGN)) )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 09:55:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 09:55:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414306.1644106 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bVQ-0002bu-2w; Thu, 10 Sep 2026 09:55:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414306.1644106; Thu, 10 Sep 2026 09:55:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bVQ-0002bk-02; Thu, 10 Sep 2026 09:55:44 +0000
Received: by outflank-mailman (input) for mailman id 1414306;
 Thu, 10 Sep 2026 09:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bVO-0002ZX-Ag
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 09:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bVN-0083Ff-36
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bVO-00F2Bb-0o
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 09:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VQknLdHidCx4Abeum6y5Zk5BRDxs3vAm1b3L5mHKz+o=; b=nbJRthdywSP2q8h2VZdzz+cfiJ
	Linl26AEOunH/DRmqC+/7XBBJ6042iM5oiacQvaYUBl3EltqXGhZVORae6mxoZQ4FAeNUxZxN4xte
	fzSYmxVmCM8aXC4SPhDYbVSwMRlFa9IrJa1PFZGwL1daAhVo8M+gjg3SyJGtlzCmnV8E=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/dom0less: turn max_init_domid into a common variable
Message-Id: <E1x4bVO-00F2Bb-0o@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 09:55:42 +0000

commit 2f73bc7c06398f95a4d9f0b89d52ba22c7815870
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Thu Sep 10 09:02:08 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 09:02:08 2026 +0200

    xen/dom0less: turn max_init_domid into a common variable
    
    Until now every architecture carried its own notion of max_init_domid:
    Arm defined a real variable (declared in asm/setup.h, defined in
    setup.c), while ppc, riscv and x86 each provided a "#define
    max_init_domid (0)" stub in their asm/setup.h. This duplicated the same
    declaration across all arches and placed a purely dom0less concept in
    arch setup headers.
    
    Now that the dom0less build code lives in common (xen/common/
    device-tree/dom0less-build.c sets max_init_domid, and the console
    serial-input switcher reads it), there is no reason for the symbol to be
    per-arch. Provide a single declaration in <xen/dom0less-build.h>, with
    the !CONFIG_DOM0LESS_BOOT stub kept there as well, so there is one source
    of truth and the arch headers no longer need to mention it. Update
    console.c to include <xen/dom0less-build.h> for the declaration instead
    of relying on asm/setup.h, and drop the now unneeded <asm/setup.h>
    include.
    
    Place the definition in xen/common/domid.c rather than in dom0less-
    build.c. The latter is built as dom0less-build.init.o, i.e. the whole
    object is relocated into the .init.* sections and freed after boot,
    whereas max_init_domid must outlive boot because it is read at runtime
    by the console serial-input switcher. domid.c is always linked (obj-y)
    and resides in regular (non-init) sections, so it is a correct home for
    the variable. It is marked __ro_after_init since it is only updated
    while creating boot-time domains and read-only afterwards, and guarded
    by CONFIG_DOM0LESS_BOOT as domid.c itself is unconditional.
    
    While at it, make <xen/dom0less-build.h> self-contained: it includes
    <public/xen.h>, which uses the fixed-width types provided by
    <xen/types.h>, so include the latter explicitly rather than relying on
    the includer having pulled it in first. This becomes necessary as soon
    as <xen/dom0less-build.h> comes first in an alphabetically sorted
    include list, as it now does in domid.c.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/include/asm/setup.h   | 2 --
 xen/arch/arm/setup.c               | 2 --
 xen/arch/ppc/include/asm/setup.h   | 2 --
 xen/arch/riscv/include/asm/setup.h | 2 --
 xen/arch/x86/include/asm/setup.h   | 2 --
 xen/common/domid.c                 | 5 +++++
 xen/drivers/char/console.c         | 2 +-
 xen/include/xen/dom0less-build.h   | 8 ++++++++
 8 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.h
index 0adfa4993a..2af7805125 100644
--- a/xen/arch/arm/include/asm/setup.h
+++ b/xen/arch/arm/include/asm/setup.h
@@ -25,8 +25,6 @@ struct map_range_data
     struct rangeset *irq_ranges;
 };
 
-extern domid_t max_init_domid;
-
 void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len);
 
 size_t estimate_efi_size(unsigned int mem_nr_banks);
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 6310a47d68..86532d0a35 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -62,8 +62,6 @@ struct cpuinfo_arm __read_mostly system_cpuinfo;
 bool __read_mostly acpi_disabled;
 #endif
 
-domid_t __read_mostly max_init_domid;
-
 static __used void noreturn init_done(void)
 {
     /* Must be done past setting system_state. */
diff --git a/xen/arch/ppc/include/asm/setup.h b/xen/arch/ppc/include/asm/setup.h
index e4f64879b6..956fa6985a 100644
--- a/xen/arch/ppc/include/asm/setup.h
+++ b/xen/arch/ppc/include/asm/setup.h
@@ -1,6 +1,4 @@
 #ifndef __ASM_PPC_SETUP_H__
 #define __ASM_PPC_SETUP_H__
 
-#define max_init_domid (0)
-
 #endif /* __ASM_PPC_SETUP_H__ */
diff --git a/xen/arch/riscv/include/asm/setup.h b/xen/arch/riscv/include/asm/setup.h
index 2215894cfb..73ce2f2933 100644
--- a/xen/arch/riscv/include/asm/setup.h
+++ b/xen/arch/riscv/include/asm/setup.h
@@ -5,8 +5,6 @@
 
 #include <xen/types.h>
 
-#define max_init_domid (0)
-
 void setup_mm(void);
 
 void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len);
diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h
index b01e83a8ed..5925c5f39c 100644
--- a/xen/arch/x86/include/asm/setup.h
+++ b/xen/arch/x86/include/asm/setup.h
@@ -68,6 +68,4 @@ extern bool opt_dom0_verbose;
 extern bool opt_dom0_cpuid_faulting;
 extern bool opt_dom0_msr_relaxed;
 
-#define max_init_domid (0)
-
 #endif
diff --git a/xen/common/domid.c b/xen/common/domid.c
index b0258e477c..c0cb025609 100644
--- a/xen/common/domid.c
+++ b/xen/common/domid.c
@@ -8,8 +8,13 @@
  * Copyright 2025 Ford Motor Company
  */
 
+#include <xen/dom0less-build.h>
 #include <xen/domain.h>
 
+#ifdef CONFIG_DOM0LESS_BOOT
+domid_t __ro_after_init max_init_domid;
+#endif
+
 static DEFINE_SPINLOCK(domid_lock);
 static DECLARE_BITMAP(domid_bitmap, DOMID_FIRST_RESERVED);
 
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index fcacf37c52..e4df0bbc2e 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -30,7 +30,7 @@
 #include <xen/early_printk.h>
 #include <xen/warning.h>
 #include <xen/pv_console.h>
-#include <asm/setup.h>
+#include <xen/dom0less-build.h>
 #include <xen/sections.h>
 #include <xen/consoled.h>
 
diff --git a/xen/include/xen/dom0less-build.h b/xen/include/xen/dom0less-build.h
index 4118dec76c..75bfaa185f 100644
--- a/xen/include/xen/dom0less-build.h
+++ b/xen/include/xen/dom0less-build.h
@@ -4,6 +4,9 @@
 #define XEN_DOM0LESS_BUILD_H
 
 #include <xen/stdbool.h>
+#include <xen/types.h>
+
+#include <public/xen.h>
 
 struct domain;
 
@@ -13,6 +16,9 @@ struct boot_domain;
 struct dt_device_node;
 struct kernel_info;
 
+/* Highest domain ID assigned to a boot-time (dom0less) domain. */
+extern domid_t max_init_domid;
+
 /*
  * List of possible features for dom0less domUs
  *
@@ -72,6 +78,8 @@ static inline bool is_dom0less_mode(void)
 }
 static inline void set_xs_domain(struct domain *d) {}
 
+#define max_init_domid 0
+
 #endif /* CONFIG_DOM0LESS_BOOT */
 
 #endif /* __ASM_GENERIC_DOM0LESS_BUILD_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:00:02 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:00:02 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414325.1644119 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bZa-00045X-IR; Thu, 10 Sep 2026 10:00:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414325.1644119; Thu, 10 Sep 2026 10:00:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bZa-00045C-Fu; Thu, 10 Sep 2026 10:00:02 +0000
Received: by outflank-mailman (input) for mailman id 1414325;
 Thu, 10 Sep 2026 10:00:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bZZ-0003yB-VR
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:00:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bZZ-0083S4-20
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:00:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bZZ-00FMU9-2x
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:00:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=9ht/rkmdopk+MGIpgoT71jxodoA0y+wYr84o4hn1/bc=; b=gUAb9qdQLj9BUFILShhIJ9jZnA
	nM7wEKrakxVNonezi/sgCh/RDOUTkJxmdJcQ0AmVaXQ00Frhh5uh7hdAHS5NtLmzWpJX6BVGoOZHY
	EDRpjH/ym97ILO/X0EZiOv6a0TkO1stn5jYwovmafChJ6h5hniIfznKbHpTBkf7jkVrc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/rcu: fix types
Message-Id: <E1x4bZZ-00FMU9-2x@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:00:01 +0000

commit fff00f1826d878f41aa55e9ebd78f6b210a72996
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Wed Sep 2 14:52:34 2026 +0200
Commit:     Roger Pau Monne <roger@xenproject.org>
CommitDate: Thu Sep 10 11:54:12 2026 +0200

    xen/rcu: fix types
    
    Adjust some types: int -> bool, int -> unsigned int. Also fix a couple of
    typos plus trailing white space.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/common/rcupdate.c      | 12 ++++++------
 xen/include/xen/rcupdate.h |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index fd5d3d7484..3b96f829c8 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -509,18 +509,18 @@ static int __rcu_pending(struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
     return 0;
 }
 
-int rcu_pending(int cpu)
+bool rcu_pending(unsigned int cpu)
 {
-    return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
+    return !!__rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
 }
 
 /*
  * Check to see if any future RCU-related work will need to be done
  * by the current CPU, even if none need be done immediately, returning
- * 1 if so.  This function is part of the RCU implementation; it is -not-
+ * true if so.  This function is part of the RCU implementation; it is -not-
  * an exported member of the RCU API.
  */
-int rcu_needs_cpu(int cpu)
+bool rcu_needs_cpu(unsigned int cpu)
 {
     struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
 
@@ -529,7 +529,7 @@ int rcu_needs_cpu(int cpu)
 
 /*
  * Timer for making sure the CPU where a callback is queued does
- * periodically poke rcu_pedning(), so that it will invoke the callback
+ * periodically poke rcu_pending(), so that it will invoke the callback
  * not too late after the end of the grace period.
  */
 static void rcu_idle_timer_start(void)
@@ -588,7 +588,7 @@ static void cf_check rcu_idle_timer_handler(void* data)
                                 IDLE_TIMER_PERIOD_MIN);
 }
 
-void rcu_check_callbacks(int cpu)
+void rcu_check_callbacks(unsigned int cpu)
 {
     struct rcu_data *rdp = &this_cpu(rcu_data);
 
diff --git a/xen/include/xen/rcupdate.h b/xen/include/xen/rcupdate.h
index 95f4ad81c4..c57f628107 100644
--- a/xen/include/xen/rcupdate.h
+++ b/xen/include/xen/rcupdate.h
@@ -77,8 +77,8 @@ struct rcu_head {
 } while (0)
 
 
-int rcu_pending(int cpu);
-int rcu_needs_cpu(int cpu);
+bool rcu_pending(unsigned int cpu);
+bool rcu_needs_cpu(unsigned int cpu);
 
 /*
  * Dummy lock type for passing to rcu_read_{lock,unlock}. Currently exists
@@ -168,10 +168,10 @@ static inline void rcu_read_unlock(rcu_read_lock_t *lock)
 #define rcu_assign_pointer(p, v) ({ smp_wmb(); (p) = (v); })
 
 void rcu_init(void);
-void rcu_check_callbacks(int cpu);
+void rcu_check_callbacks(unsigned int cpu);
 
 /* Exported interfaces */
-void call_rcu(struct rcu_head *head, 
+void call_rcu(struct rcu_head *head,
               void (*func)(struct rcu_head *head));
 
 void rcu_barrier(void);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:00:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:00:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414328.1644122 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bZk-0004qf-Jj; Thu, 10 Sep 2026 10:00:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414328.1644122; Thu, 10 Sep 2026 10:00:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bZk-0004qY-HH; Thu, 10 Sep 2026 10:00:12 +0000
Received: by outflank-mailman (input) for mailman id 1414328;
 Thu, 10 Sep 2026 10:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bZk-0004qL-9u
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bZj-0083SA-2H
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bZk-00FNKn-00
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Zi+JdSZKIVQ0nc40NCbGiy6s2I8Aja0sVn0PQ1utFeI=; b=YOH6Wsy/e/g1QsNKMhX169yFEL
	fPAwyIWQz9DB5Tpc6VSht8dgXjPmNBEk/BGs4uF7U43fIMStk/Vncg0s5oQh7CR0EM8bqToMz+2EL
	ZT2fAYnKBwbbpPbVqZ5PpTHEj4E2D+X/gjWLd5r/fa5UAQ4ouM4dbpf4QyFpYZb8dRW4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/rcu: sort includes
Message-Id: <E1x4bZk-00FNKn-00@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:00:12 +0000

commit 0ea57a11f5a285ed4b8744f2e16b1966ebcf350e
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Wed Sep 2 16:19:09 2026 +0200
Commit:     Roger Pau Monne <roger@xenproject.org>
CommitDate: Thu Sep 10 11:54:12 2026 +0200

    xen/rcu: sort includes
    
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/common/rcupdate.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index 3b96f829c8..c1b6b2ae76 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -31,21 +31,22 @@
  * For detailed explanation of Read-Copy Update mechanism see -
  * http://lse.sourceforge.net/locking/rcupdate.html
  */
-#include <xen/types.h>
-#include <xen/kernel.h>
+#include <xen/bitops.h>
+#include <xen/cpu.h>
 #include <xen/init.h>
+#include <xen/kernel.h>
 #include <xen/param.h>
-#include <xen/sections.h>
-#include <xen/spinlock.h>
-#include <xen/smp.h>
+#include <xen/percpu.h>
 #include <xen/rcupdate.h>
 #include <xen/sched.h>
-#include <asm/atomic.h>
-#include <xen/bitops.h>
-#include <xen/percpu.h>
+#include <xen/sections.h>
+#include <xen/smp.h>
 #include <xen/softirq.h>
-#include <xen/cpu.h>
+#include <xen/spinlock.h>
 #include <xen/stop_machine.h>
+#include <xen/types.h>
+
+#include <asm/atomic.h>
 
 DEFINE_PER_CPU(unsigned int, rcu_lock_cnt);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:00:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:00:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414329.1644126 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bZu-0004si-LO; Thu, 10 Sep 2026 10:00:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414329.1644126; Thu, 10 Sep 2026 10:00:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4bZu-0004sa-Ii; Thu, 10 Sep 2026 10:00:22 +0000
Received: by outflank-mailman (input) for mailman id 1414329;
 Thu, 10 Sep 2026 10:00:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4bZu-0004sT-5B
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:00:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bZt-0083SG-2b
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:00:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4bZu-00FODi-0J
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:00:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=hXnY46nb2PwicF2wOABIDVzddx2gv/K+FwQBxiIcJk0=; b=58eFnNMIfEvTSH/ZQe1JrzlRej
	wiBtVym25zb9Qc82jcubp2h1tQz1kXrt1kp2eg10Sm4EvcOIUXRT+kxcPgBC0FMKcd1BoMTP0EE+l
	KOKgmWfgj/bRbZe1P4lVFtoelFYHvdJKF4vZ4hJq2Majsm4YA7eJ48jFtUDvCPKuGWDE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/mm: limit deferred TLB flushing to PV domain support
Message-Id: <E1x4bZu-00FODi-0J@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:00:22 +0000

commit d7bf1b8ea2756b6160d41bf377a85365dbd6f8f6
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Mon Jul 27 16:36:15 2026 +0200
Commit:     Roger Pau Monne <roger@xenproject.org>
CommitDate: Thu Sep 10 11:54:12 2026 +0200

    x86/mm: limit deferred TLB flushing to PV domain support
    
    The current logic on x86 will mark all domain owned pages as needing a TLB
    flush before being re-used.  However such TLB flushing is only strictly
    needed when the pages might have been mapped by a PV domain, as those can
    keep a reference to the page in the TLB after it has been freed.
    
    Limit the flushing to builds with PV domain support, as tracking whether a
    page might have been mapped by a PV domain is not trivial (and possibly not
    worth the extra logic).
    
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/common/page_alloc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 62ac89b824..fe150eccd7 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1538,8 +1538,13 @@ static bool mark_page_free(struct page_info *pg, mfn_t mfn)
         BUG();
     }
 
-    /* If a page has no owner it will need no safety TLB flush. */
-    pg->u.free.need_tlbflush = (page_get_owner(pg) != NULL);
+    /*
+     * If a page has no owner and there's no PV domain support it does not need
+     * a safety TLB flush.  PV domains are the only domain types that can keep
+     * stale entries on the TLB, as they have (limited) control over the host
+     * MMU and when flushes are performed.
+     */
+    pg->u.free.need_tlbflush = IS_ENABLED(CONFIG_PV) && page_get_owner(pg);
     if ( pg->u.free.need_tlbflush )
         page_set_tlbflush_timestamp(pg);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:55:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:55:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414408.1644149 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cQp-0004JC-Kr; Thu, 10 Sep 2026 10:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414408.1644149; Thu, 10 Sep 2026 10:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cQp-0004J4-IA; Thu, 10 Sep 2026 10:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1414408;
 Thu, 10 Sep 2026 10:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cQo-0004Iy-CC
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cQn-0084XL-2u
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cQo-002DvL-0a
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sKon26VZeiaGrSAjyY9ozylegRmKDvnYRpKpvnCPXoo=; b=F+dVEP7GuDKhGQBPurexQlhgZ4
	j3mUaJT12Q2Qw0cek6s9znbodwPFcbQ2TXruXMhZTYBX/F9Yy254cmdDTCX4hxuJgegesW7Ghbm+d
	Rlwt1noh4OPqB9ok0rxdWFoAXsRaLBb+V0WeHikIEdnTKEO5zW/hL0HSfgpk/OQ78O08=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/vpci: allow unaligned accesses by the hardware domain
Message-Id: <E1x4cQo-002DvL-0a@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:55:02 +0000

commit 0822a2e890e93d4e1d0c99c8a5062a317788f3ae
Author:     Roger Pau Monné <roger@xenproject.org>
AuthorDate: Thu Sep 10 12:31:05 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:31:05 2026 +0200

    xen/vpci: allow unaligned accesses by the hardware domain
    
    It's possible for domains to generate unaligned PCI config space accesses
    when using ECAM, and hence vPCI should support those at least for the
    hardware domain.  Such unaligned accesses to the PCI config space have been
    reported to come from ACPI logic.
    
    Relax the checking in vpci_access_allowed() to allow such accesses for the
    hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
    fulfill them using MMCFG.
    
    MMCFG regions are identity exposed to the hardware domain, and hence such
    unaligned accesses can only come as a result of the host having MMCFG in the
    first place, as otherwise MMCFG won't be exposed to the hardware domain
    either.
    
    Note that vpci_ecam_{read,write}() already refuse accesses that cross a
    device boundary unconditionally.
    
    Reported-by: Jason Andryuk <jason.andryuk@amd.com>
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
    master commit: 79175b13906936855ae354f696f16093e5e29446
    master date: 2026-08-26 11:50:42 +0200
---
 tools/include/xen-tools/common-macros.h | 2 ++
 xen/arch/x86/x86_64/pci.c               | 8 ++++----
 xen/drivers/vpci/vpci.c                 | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 88b4a0e5a6..1f9146b23b 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -68,6 +68,8 @@
     })
 #endif
 
+#define IS_ALIGNED(val, align) (!((val) & ((align) - 1)))
+
 #define ROUNDUP(x, a) (((x) + (a) - 1) & ~((a) - 1))
 #define ROUNDDOWN(x, a) ((x) & ~((a) - 1))
 
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 8d33429103..6298141c3c 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -26,7 +26,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
 uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
     {
         uint32_t value;
 
@@ -39,7 +39,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 
 uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
     {
         uint32_t value;
 
@@ -60,7 +60,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
@@ -68,7 +68,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index 0ac9ec8b04..9e2c27e3a3 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -685,6 +685,8 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned int size,
 /* Helper function to check an access size and alignment on vpci space. */
 bool vpci_access_allowed(unsigned int reg, unsigned int len)
 {
+    const struct domain *currd = current->domain;
+
     /* Check access size. */
     if ( len != 1 && len != 2 && len != 4 && len != 8 )
         return false;
@@ -695,8 +697,8 @@ bool vpci_access_allowed(unsigned int reg, unsigned int len)
         return false;
 #endif
 
-    /* Check that access is size aligned. */
-    if ( (reg & (len - 1)) )
+    /* Refuse unaligned accesses for non-hardware domains. */
+    if ( !is_hardware_domain(currd) && !IS_ALIGNED(reg, len) )
         return false;
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:55:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:55:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414409.1644153 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cQz-0004Kx-MR; Thu, 10 Sep 2026 10:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414409.1644153; Thu, 10 Sep 2026 10:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cQz-0004Kp-JU; Thu, 10 Sep 2026 10:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1414409;
 Thu, 10 Sep 2026 10:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cQy-0004Kg-Bw
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cQy-0084XP-01
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cQy-002EnR-0v
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Y4WU/dBKgHieuIco5VluHfWyvKhmX83fk1QGo0Mzm+k=; b=bX8c5x2dt57XFj57aiJTkEJRwu
	JtOAw/AAj8qnN9x2vv0TC67JYagDE9o4KtcYMOJdPxUXgX+NFMaMs+8RzbNLIE+hmhUwf+8Rz95V0
	mnvLmDKstW8VWJbYUYfmTf9L2XbIWwNO2NbX+fcTTC65Wjp1Tvtdcdft86YPx8xsGTkI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x4cQy-002EnR-0v@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:55:12 +0000

commit f692b1badf84233e0bd905778bd284b4df7ff935
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Thu Sep 10 12:31:47 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:31:47 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    master commit: 2565341135f88081535f6830a6256277e2834403
    master date: 2026-09-01 10:02:13 +0200
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 9ccf5811bf..67ae5a7968 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -584,7 +584,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -864,8 +864,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414410.1644157 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cR9-0004NT-Ot; Thu, 10 Sep 2026 10:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414410.1644157; Thu, 10 Sep 2026 10:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cR9-0004NL-MH; Thu, 10 Sep 2026 10:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1414410;
 Thu, 10 Sep 2026 10:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cR8-0004NF-EZ
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cR8-0084XT-0J
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cR8-002Fh7-1F
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=vNbRawRrVsjsc8xL6Tf8P9dTndYmAf0/L2PUI14SBA4=; b=RUqy9MmS0m/AXhl8ui1o91XEpR
	xaSI/UDPfn8u0pmixDk+kQhAJvDezMm1bcXkQQJe8hMBxCdNr6V7iaUn6s/l2QjG7o9B5h130bvPa
	EBsf2IRikGHcbicTVbltqu6QzWsjLiGL2vGECMXUZ7buyo0cahbztTWLMuQvayw06O1I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x4cR8-002Fh7-1F@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:55:22 +0000

commit 2bd89c0ef37be571f1fdd93755ddda9817384d42
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:32:20 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:32:20 2026 +0200

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b4a671acf151dec87bc99bc2547e73149bd3c55e
    master date: 2026-09-03 09:45:16 +0100
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index fd0715fb6a..34dce6d9bb 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -76,8 +76,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, 1);
 
     if ( rc < 0 )
@@ -93,7 +94,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414411.1644160 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRJ-0004PX-QA; Thu, 10 Sep 2026 10:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414411.1644160; Thu, 10 Sep 2026 10:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRJ-0004PN-NY; Thu, 10 Sep 2026 10:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1414411;
 Thu, 10 Sep 2026 10:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cRI-0004PH-Hv
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRI-0084XZ-0c
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRI-002GVm-1Y
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2JxSPkWlVPbVS6OEEi5zwlYqC/xAz7GoU7wRJoNqW2o=; b=r8xH2lCBFUl0YQM9o1Pveid+U/
	uRPYTHIesKEeZxUJ6sf9pnuVj4FJmIpoT1TDTcOFet6D9AYz5u4y+hCN9H+xZ5gp5gjwsTpo4yXmP
	P3ACW7otigG0yQ1eAsgI1mL6sTBj8JwFpQKb3ZyBL1tdorvg7TfTm2M0EpUgDMQJJV/U=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] libacpi: drop mk_dsdt's -d / --debug option
Message-Id: <E1x4cRI-002GVm-1Y@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:55:32 +0000

commit a9df8eb103bdb94986fbd6c85e0feb3b6fca07c1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:32:40 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:32:40 2026 +0200

    libacpi: drop mk_dsdt's -d / --debug option
    
    Recent Clang complains about the "debug" static variable only ever being
    written to. Drop it and the command line option controlling it.
    
    Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
    master commit: f907784c320da65c912ea04ed9f83f29e59dbd87
    master date: 2026-09-07 14:11:35 +0200
---
 tools/libacpi/Makefile  | 8 ++++----
 tools/libacpi/mk_dsdt.c | 7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index 193ec78672..3b4c3d8c86 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSD
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
@@ -51,17 +51,17 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl  $(MK_DSDT)
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
 	cat dsdt_acpi_info.asl >> $@
-	$(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@
+	$(MK_DSDT) --maxcpu any --dm-version none >> $@
 
 $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 3, \"Xen\", \"ARM\", 1)\n{" > $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index f71de6c8c6..001c3875c3 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -15,7 +15,6 @@
 #endif
 
 static unsigned int indent_level;
-static bool debug = false;
 
 typedef enum dm_version {
     QEMU_NONE,
@@ -73,7 +72,6 @@ static struct option options[] = {
 #ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
 #endif
-    { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
@@ -125,10 +123,7 @@ int main(int argc, char **argv)
             }
             break;
 #endif
-        case 'd':
-            if (*optarg == 'y')
-                debug = true;
-            break;
+
         default:
             return -1;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:55:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:55:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414412.1644165 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRT-0004RX-RU; Thu, 10 Sep 2026 10:55:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414412.1644165; Thu, 10 Sep 2026 10:55:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRT-0004RM-Oq; Thu, 10 Sep 2026 10:55:43 +0000
Received: by outflank-mailman (input) for mailman id 1414412;
 Thu, 10 Sep 2026 10:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cRS-0004RD-Kt
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRS-0084Xd-0v
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRS-002HQb-1p
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=W1Z6+kjq7MKEkzNKWSf0BlrL7YeChcGmHbUPZ9IFIdU=; b=V8noSGAddtPb3nrO2nOXknYFVz
	T9HxFzaP2dhFeUzN3gCW6rkv5RClHAUyAlaWlavAPc+T+nuI4B6p9ml+Z4GmfbYH6J2Hk5SxqTnxX
	U/YxR/SYZh2UZvNrGknYNz2EI9N3UolkhAievupiMi2t5pQoeaFeEq5D3eCdLxlQcJ+M=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x4cRS-002HQb-1p@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:55:42 +0000

commit 2896911c958d477ab8fbd4436aae62bceef5ca73
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:32:54 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:32:54 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: f7eab298bb9f2634e555aea1db70efcbbfd4d316
    master date: 2026-09-08 09:50:48 +0200
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 179eb20f4e..7ebfb0b7e3 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -263,7 +263,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:55:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:55:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414413.1644170 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRd-0004Ti-TK; Thu, 10 Sep 2026 10:55:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414413.1644170; Thu, 10 Sep 2026 10:55:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRd-0004TZ-Q6; Thu, 10 Sep 2026 10:55:53 +0000
Received: by outflank-mailman (input) for mailman id 1414413;
 Thu, 10 Sep 2026 10:55:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cRc-0004TT-NQ
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:55:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRc-0084Xx-1C
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRc-002IQ9-28
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=iTDyvyEHqCEYK0IwidD6hL92pCKH3ha28xqg/jyB0sQ=; b=wDuqH4jVidApnTFoHgSxbei9OC
	aQYkr+w5PtKyDgNlcljDDb+845v+ctnnfsfcYfYxovO2zeUo+Q9Ph8VrXMp7IvbuK3A3llMW/2cvs
	DDahQtB0EZ3jaFnJ7oousD2APnr75HOErfgR5MnbI17vOiSUzcSSDYb0GyoPyyq9AwY8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4cRc-002IQ9-28@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:55:52 +0000

commit cc07f4b05803b89a7a6a78c8324da5aba9a192d9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:33:11 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:33:11 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    master commit: 5df9425a733ea42613d2f414ec88d2c770ea4c20
    master date: 2026-09-09 14:15:15 +0200
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index f91ba6f740..b1462883ec 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -27,10 +27,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:56:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:56:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414414.1644173 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRn-0004Vg-UP; Thu, 10 Sep 2026 10:56:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414414.1644173; Thu, 10 Sep 2026 10:56:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRn-0004VY-RT; Thu, 10 Sep 2026 10:56:03 +0000
Received: by outflank-mailman (input) for mailman id 1414414;
 Thu, 10 Sep 2026 10:56:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cRm-0004VQ-Qa
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:56:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRm-0084YK-1T
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRm-002JP4-2P
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=s6kUMC3OtEur13bJIdE5RRoltLMXavq1P/NS8doQgJY=; b=2GoZTTj56UnisPqpBCSm2JG6Tb
	DTG/YXCo2J3BNpJ3C64MRdQezGnmb/fgcN8p4+5iToIol3QxkrZyovuhvNyacuWZzs8dBrPhvCwhg
	Dg1ptR6+uQD3HIZbWJCH82WOqJ95XYpZXAyUt2YMVeTovb+Uuv+Gdir1Tlq7ubZMdYvY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4cRm-002JP4-2P@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:56:02 +0000

commit b8fe9e33743c7a387b67fee9d288dcb5c49f3813
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:33:25 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:33:25 2026 +0200

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    master commit: 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
    master date: 2026-09-09 18:07:32 +0100
---
 xen/arch/x86/cpu/microcode/intel.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index c45b00c6b0..425bfc1045 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -27,6 +27,7 @@
 #include <xen/string.h>
 #include <xen/xmalloc.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -273,6 +274,44 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.vfm == INTEL_GRANITERAPIDS_X &&
+         boot_cpu_data.stepping == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -365,6 +404,7 @@ static struct microcode_patch *cf_check intel_ucode_parse(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:56:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:56:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414415.1644177 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRy-0004Xc-VX; Thu, 10 Sep 2026 10:56:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414415.1644177; Thu, 10 Sep 2026 10:56:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cRy-0004XU-Si; Thu, 10 Sep 2026 10:56:14 +0000
Received: by outflank-mailman (input) for mailman id 1414415;
 Thu, 10 Sep 2026 10:56:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cRx-0004XM-A4
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:56:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRw-0084YQ-33
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cRx-002KL2-0m
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=RKQzFTtxfP7Dx7xEJJyvF8iajNxzWuWrADmuI6Hfwh0=; b=SLPIQaBlGRYoWBrqmEH3IWbrSX
	ZG3iL81lPeQt4Sg6r0ZUREtTARpfVL920zpg9T24d4CcEybQ63pBH3kTDgK3DJG6L7k/PT2KZdgwW
	IICM/DPeuCv0m9u+VdKjtc7ABvmjr3OZ4wYza8v3S/Bd6RFR+1EbfwjDX33tCF4VhLoU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/vpci: allow unaligned accesses by the hardware domain
Message-Id: <E1x4cRx-002KL2-0m@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:56:13 +0000

commit 93b05680e3ee093d6946b106e5e72abb34ba1a44
Author:     Roger Pau Monné <roger@xenproject.org>
AuthorDate: Thu Sep 10 12:34:38 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:34:38 2026 +0200

    xen/vpci: allow unaligned accesses by the hardware domain
    
    It's possible for domains to generate unaligned PCI config space accesses
    when using ECAM, and hence vPCI should support those at least for the
    hardware domain.  Such unaligned accesses to the PCI config space have been
    reported to come from ACPI logic.
    
    Relax the checking in vpci_access_allowed() to allow such accesses for the
    hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
    fulfill them using MMCFG.
    
    MMCFG regions are identity exposed to the hardware domain, and hence such
    unaligned accesses can only come as a result of the host having MMCFG in the
    first place, as otherwise MMCFG won't be exposed to the hardware domain
    either.
    
    Note that vpci_ecam_{read,write}() already refuse accesses that cross a
    device boundary unconditionally.
    
    Reported-by: Jason Andryuk <jason.andryuk@amd.com>
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
    master commit: 79175b13906936855ae354f696f16093e5e29446
    master date: 2026-08-26 11:50:42 +0200
---
 tools/include/xen-tools/common-macros.h | 2 ++
 xen/arch/x86/x86_64/pci.c               | 8 ++++----
 xen/drivers/vpci/vpci.c                 | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 9838a108aa..06690e92fd 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -68,6 +68,8 @@
     })
 #endif
 
+#define IS_ALIGNED(val, align) (!((val) & ((align) - 1)))
+
 #ifndef ROUNDUP
 #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 #endif
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 8d33429103..6298141c3c 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -26,7 +26,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
 uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
     {
         uint32_t value;
 
@@ -39,7 +39,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 
 uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
     {
         uint32_t value;
 
@@ -60,7 +60,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
@@ -68,7 +68,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index 07c7071d0a..1e088e20d6 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -927,6 +927,8 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned int size,
 /* Helper function to check an access size and alignment on vpci space. */
 bool vpci_access_allowed(unsigned int reg, unsigned int len)
 {
+    const struct domain *currd = current->domain;
+
     /* Check access size. */
     if ( len != 1 && len != 2 && len != 4 && len != 8 )
         return false;
@@ -937,8 +939,8 @@ bool vpci_access_allowed(unsigned int reg, unsigned int len)
         return false;
 #endif
 
-    /* Check that access is size aligned. */
-    if ( (reg & (len - 1)) )
+    /* Refuse unaligned accesses for non-hardware domains. */
+    if ( !is_hardware_domain(currd) && !IS_ALIGNED(reg, len) )
         return false;
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:56:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:56:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414416.1644180 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cS9-0004ZZ-0c; Thu, 10 Sep 2026 10:56:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414416.1644180; Thu, 10 Sep 2026 10:56:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cS8-0004ZR-U6; Thu, 10 Sep 2026 10:56:24 +0000
Received: by outflank-mailman (input) for mailman id 1414416;
 Thu, 10 Sep 2026 10:56:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cS7-0004ZJ-Ej
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:56:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cS7-0084YV-0K
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cS7-002LCr-13
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=3vkUQuuWcoh9KzhXXs1NULfMa8wUITkWZHTlEtqsn2c=; b=rInnK62D5DA9Mo3fK7WvbMtQyu
	uWYZLkrW+Ax8/S4OWeSPnFZJJCDh/oFMQhy4848NFmdOclzlS6WBRhizfVP+5lYVR6D66E9MioL8a
	YKpnUoAtWrQ4GkVwXXNHodyU4msgbSSghpDMUb61wjAwpHs1gY/xsR9u/HWa9pIzUL3c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x4cS7-002LCr-13@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:56:23 +0000

commit 839d930f4eb9d78b5f5ca249cea15d2c4efd5cf7
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Thu Sep 10 12:35:02 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:02 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    master commit: 2565341135f88081535f6830a6256277e2834403
    master date: 2026-09-01 10:02:13 +0200
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index a374e59a84..90ec975398 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -565,7 +565,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -845,8 +845,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:56:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:56:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414417.1644185 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSJ-0004c0-3K; Thu, 10 Sep 2026 10:56:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414417.1644185; Thu, 10 Sep 2026 10:56:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSJ-0004bs-0a; Thu, 10 Sep 2026 10:56:35 +0000
Received: by outflank-mailman (input) for mailman id 1414417;
 Thu, 10 Sep 2026 10:56:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cSH-0004bm-HQ
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:56:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSH-0084Yc-0b
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSH-002M1K-1Y
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=RL+LYiKCUdZfSvmSRJduO6D414GeS5J7/tMPIvvvkFw=; b=vGCHEnBBPebzue+fmyTjEuMWFB
	7LpvrtHrkZ3QjWz+1fJfF+qKZqJlehktNPcdkKQ+xz0B1Kv0Jd3eq8BcuKEnTYxND/CvdJEOVcr38
	2ed66OmHb4h5PwONyJeXNNeEd1hqmBZZRZIZWAtMOyicXVf1KopPma54wNA9dxg175pQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x4cSH-002M1K-1Y@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:56:33 +0000

commit d00962f021be1d70a8eaa0c0505aea601d75ab76
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:35:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:18 2026 +0200

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b4a671acf151dec87bc99bc2547e73149bd3c55e
    master date: 2026-09-03 09:45:16 +0100
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index fd0715fb6a..34dce6d9bb 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -76,8 +76,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, 1);
 
     if ( rc < 0 )
@@ -93,7 +94,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:56:45 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:56:45 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414418.1644189 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cST-0004eI-4f; Thu, 10 Sep 2026 10:56:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414418.1644189; Thu, 10 Sep 2026 10:56:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cST-0004e9-1x; Thu, 10 Sep 2026 10:56:45 +0000
Received: by outflank-mailman (input) for mailman id 1414418;
 Thu, 10 Sep 2026 10:56:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cSR-0004dl-Jy
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:56:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSR-0084Yl-0r
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSR-002Mnj-1p
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zQCWhozzEHVff/hn7FkJzaij8vhs+8Lef4XTCwoqya4=; b=6GiCVHcw/Vt6ic535cvDiOP/YB
	uR87bLL1oIn0dKQytUw6aogzOiQT96PCz50XlCYAKqChD4pYDXiAvkPSRBz6HXxd8cLTLeNyuApiD
	Q5Kq/P/JkRLoE89Spx4qJwsLI7i1vdUpIeVZCHy0izMQQIqNq73YEBF1b6giPvr2QEgk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] libacpi: drop mk_dsdt's -d / --debug option
Message-Id: <E1x4cSR-002Mnj-1p@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:56:43 +0000

commit 52f07993948541b9583c36462be20d2a948d9639
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:35:39 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:39 2026 +0200

    libacpi: drop mk_dsdt's -d / --debug option
    
    Recent Clang complains about the "debug" static variable only ever being
    written to. Drop it and the command line option controlling it.
    
    Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
    master commit: f907784c320da65c912ea04ed9f83f29e59dbd87
    master date: 2026-09-07 14:11:35 +0200
---
 tools/libacpi/Makefile  | 8 ++++----
 tools/libacpi/mk_dsdt.c | 7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index 193ec78672..3b4c3d8c86 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSD
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
@@ -51,17 +51,17 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl  $(MK_DSDT)
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
 	cat dsdt_acpi_info.asl >> $@
-	$(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@
+	$(MK_DSDT) --maxcpu any --dm-version none >> $@
 
 $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 3, \"Xen\", \"ARM\", 1)\n{" > $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index f71de6c8c6..001c3875c3 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -15,7 +15,6 @@
 #endif
 
 static unsigned int indent_level;
-static bool debug = false;
 
 typedef enum dm_version {
     QEMU_NONE,
@@ -73,7 +72,6 @@ static struct option options[] = {
 #ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
 #endif
-    { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
@@ -125,10 +123,7 @@ int main(int argc, char **argv)
             }
             break;
 #endif
-        case 'd':
-            if (*optarg == 'y')
-                debug = true;
-            break;
+
         default:
             return -1;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:56:55 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:56:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414419.1644193 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSd-0004gB-62; Thu, 10 Sep 2026 10:56:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414419.1644193; Thu, 10 Sep 2026 10:56:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSd-0004g4-3F; Thu, 10 Sep 2026 10:56:55 +0000
Received: by outflank-mailman (input) for mailman id 1414419;
 Thu, 10 Sep 2026 10:56:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cSb-0004fy-Mi
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:56:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSb-0084ZC-19
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSb-002Nbr-25
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:56:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Z69PauOE6ti57p49IFAu4CNQzzdTsEe+qmCiXr5GyLg=; b=Pvh7pBeFniHTyqzJgsa6uAneyu
	xJFqOFuy7XWb5tuqXgegwdpYMB01wtcFqbI7A/lzrksBlqKs0fT8UPHmhIgs4QN19s8cowLSLQ9DV
	uM4HE3+ATap5yuszBGiUg0Wp4E4I6KokynIed5qK4xkVAjXOIw7Ipm1ub9Z3Q5o7zWnA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x4cSb-002Nbr-25@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:56:53 +0000

commit 564411f65bed8dc6feb50c7f96af030e61ded1bd
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:35:52 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:52 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: f7eab298bb9f2634e555aea1db70efcbbfd4d316
    master date: 2026-09-08 09:50:48 +0200
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 24f447b957..e1a8194dfd 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -262,7 +262,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:57:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:57:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414420.1644197 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSn-0004iC-7W; Thu, 10 Sep 2026 10:57:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414420.1644197; Thu, 10 Sep 2026 10:57:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSn-0004i5-4w; Thu, 10 Sep 2026 10:57:05 +0000
Received: by outflank-mailman (input) for mailman id 1414420;
 Thu, 10 Sep 2026 10:57:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cSl-0004hx-Pd
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:57:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSl-0084ZR-1Q
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSl-002OMg-2N
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IVC3LDxPqcgi+mNV+E5aY0cdymNL4TIvpnPiqAgNeuI=; b=JGXE1fjUB51E3drOT0H4NDERnP
	70FH5YhzaiZLNy8Q1qUykQ9aTiXiZnM+MGJRh5sKCbHus3WR4bzP/XUgfS+hQg0hwkXQQ6GhbFEd/
	ogm2i3MjRzOr062BlNuy5IWIjGNKqi1TqzltFhV2m+s8jMxwEoXP8WPq0qzZL8+YCAHI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4cSl-002OMg-2N@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:57:03 +0000

commit ed8c7aad59794f057138122f40873141e88673e9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:36:07 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:36:07 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    master commit: 5df9425a733ea42613d2f414ec88d2c770ea4c20
    master date: 2026-09-09 14:15:15 +0200
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 7b12005bea..cbb46df3df 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -28,10 +28,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:57:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:57:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414421.1644201 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSx-0004kD-9I; Thu, 10 Sep 2026 10:57:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414421.1644201; Thu, 10 Sep 2026 10:57:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cSx-0004k5-6P; Thu, 10 Sep 2026 10:57:15 +0000
Received: by outflank-mailman (input) for mailman id 1414421;
 Thu, 10 Sep 2026 10:57:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cSv-0004jy-SG
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:57:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSv-0084ZX-1g
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cSv-002P7P-2e
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=T5AcqFiH+f5pRHpTwKUnP5mcfThRG155SC8isZKNi9E=; b=YKC8oB2osY0KTkQFvex00EHXZd
	x1HDNPRXQTq6c2iv0hOl/IKGwIBFcT/6KqEHpjvgORyUiZt452R09wB9F2cUhjiv4x+lcRKPFX3YP
	S/TiXVPpR81sxEUruuPU+f2SHkNqiZvq24OhR2bM8tJs4rHtmDQrCpLlZp6uCk348R3Q=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4cSv-002P7P-2e@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:57:13 +0000

commit 83f221c3cdffdd6ec1357b40479a9ba1d03a9df1
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:36:15 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:36:15 2026 +0200

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    master commit: 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
    master date: 2026-09-09 18:07:32 +0100
---
 xen/arch/x86/cpu/microcode/intel.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index 281993e725..2c8dec6b8b 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -27,6 +27,7 @@
 #include <xen/string.h>
 #include <xen/xmalloc.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -273,6 +274,44 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.vfm == INTEL_GRANITERAPIDS_X &&
+         boot_cpu_data.stepping == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -365,6 +404,7 @@ static struct microcode_patch *cf_check cpu_request_microcode(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:57:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:57:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414422.1644204 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cT7-0004mC-AM; Thu, 10 Sep 2026 10:57:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414422.1644204; Thu, 10 Sep 2026 10:57:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cT7-0004m4-7p; Thu, 10 Sep 2026 10:57:25 +0000
Received: by outflank-mailman (input) for mailman id 1414422;
 Thu, 10 Sep 2026 10:57:24 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cT6-0004lw-BF
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:57:24 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cT5-0084Zb-3C
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cT6-002Q4Z-0w
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MkKKqCY3dl+n5G1g84fMItcAT/8w2+PBNB1dmSP2BNU=; b=2JCcO07tGD/mT4+KXPpOzKKgSA
	RWnYXY3p96IigzYfb+F3dbe8wCiBMBmVoOkiE7Oe9i0/GMnwNiBrcf1QstwCLlffpg8tKp/Uh1Nkz
	AdLyB3S2xOG2Pw9vP5GorTo2QOjXy7pWovOrfkU41mZdwg3LXmNnUKqhFp/JzvEhtVMQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/vpci: allow unaligned accesses by the hardware domain
Message-Id: <E1x4cT6-002Q4Z-0w@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:57:24 +0000

commit 5c619190583f5c129ba13a01342ff22920f5705d
Author:     Roger Pau Monné <roger@xenproject.org>
AuthorDate: Thu Sep 10 12:38:34 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:38:34 2026 +0200

    xen/vpci: allow unaligned accesses by the hardware domain
    
    It's possible for domains to generate unaligned PCI config space accesses
    when using ECAM, and hence vPCI should support those at least for the
    hardware domain.  Such unaligned accesses to the PCI config space have been
    reported to come from ACPI logic.
    
    Relax the checking in vpci_access_allowed() to allow such accesses for the
    hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
    fulfill them using MMCFG.
    
    MMCFG regions are identity exposed to the hardware domain, and hence such
    unaligned accesses can only come as a result of the host having MMCFG in the
    first place, as otherwise MMCFG won't be exposed to the hardware domain
    either.
    
    Note that vpci_ecam_{read,write}() already refuse accesses that cross a
    device boundary unconditionally.
    
    Reported-by: Jason Andryuk <jason.andryuk@amd.com>
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
    master commit: 79175b13906936855ae354f696f16093e5e29446
    master date: 2026-08-26 11:50:42 +0200
---
 tools/include/xen-tools/common-macros.h | 2 ++
 xen/arch/x86/x86_64/pci.c               | 8 ++++----
 xen/drivers/vpci/vpci.c                 | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 9838a108aa..06690e92fd 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -68,6 +68,8 @@
     })
 #endif
 
+#define IS_ALIGNED(val, align) (!((val) & ((align) - 1)))
+
 #ifndef ROUNDUP
 #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 #endif
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 8d33429103..6298141c3c 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -26,7 +26,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
 uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
     {
         uint32_t value;
 
@@ -39,7 +39,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 
 uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
     {
         uint32_t value;
 
@@ -60,7 +60,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
@@ -68,7 +68,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index 1e6aa5d799..62a7e676c4 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -633,6 +633,8 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned int size,
 /* Helper function to check an access size and alignment on vpci space. */
 bool vpci_access_allowed(unsigned int reg, unsigned int len)
 {
+    const struct domain *currd = current->domain;
+
     /* Check access size. */
     if ( len != 1 && len != 2 && len != 4 && len != 8 )
         return false;
@@ -643,8 +645,8 @@ bool vpci_access_allowed(unsigned int reg, unsigned int len)
         return false;
 #endif
 
-    /* Check that access is size aligned. */
-    if ( (reg & (len - 1)) )
+    /* Refuse unaligned accesses for non-hardware domains. */
+    if ( !is_hardware_domain(currd) && !IS_ALIGNED(reg, len) )
         return false;
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:57:36 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:57:36 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414423.1644210 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTI-0004pz-CP; Thu, 10 Sep 2026 10:57:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414423.1644210; Thu, 10 Sep 2026 10:57:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTI-0004pr-9D; Thu, 10 Sep 2026 10:57:36 +0000
Received: by outflank-mailman (input) for mailman id 1414423;
 Thu, 10 Sep 2026 10:57:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cTG-0004ph-Dy
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:57:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTG-0084Zf-0G
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTG-002QpO-1D
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ikroD3hNGZu+8Rn1I3GFkDj41H3RrzfL14rOACFV/Ew=; b=ST8Tk9C7tKwJs2HpMZQOFz2Ed5
	pgGyko23cExRKwYhIsMtmbdMHhr03wPgN67+Y5kh8oY5Ydal8FkLKqUla+w0WMcQNERP9D8uTHxiy
	n6e/kLUvtqsQ7BR1b7ZDrIzyDYFmCwh13sCTfsTf9y/akFV6xRb2ygYS0HCxkhHcj5po=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x4cTG-002QpO-1D@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:57:34 +0000

commit e2ca9c64ca805417ec89fed828d15a6782c732f7
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Thu Sep 10 12:39:00 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:00 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    master commit: 2565341135f88081535f6830a6256277e2834403
    master date: 2026-09-01 10:02:13 +0200
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index e1fea666f4..8931312e8f 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -565,7 +565,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -846,8 +846,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:57:46 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:57:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414424.1644212 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTS-0004v2-F5; Thu, 10 Sep 2026 10:57:46 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414424.1644212; Thu, 10 Sep 2026 10:57:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTS-0004uu-Cg; Thu, 10 Sep 2026 10:57:46 +0000
Received: by outflank-mailman (input) for mailman id 1414424;
 Thu, 10 Sep 2026 10:57:44 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cTQ-0004uT-GY
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:57:44 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTQ-0084Zj-0W
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTQ-002Rg0-1T
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=RkJj7pYE0usR6Np8+uhPNGdtWBIL5EgFb6o1xEEI0jw=; b=V50wIGppj85LfjQL7q3IJxU69g
	C6TWXvMFZAtsZWsaF7kVIXSUyzOwyEdW1E3W6JxsJMMF1W1Cckx347xG8OomG51TDiS8q8J36wvKx
	Tk7e5irszgrnM8zaQugu0qpRGiw9DcekeBebtE8MjoKoEo20w9RI5J7z0YUIm+4sRgZ4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x4cTQ-002Rg0-1T@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:57:44 +0000

commit 3cf9223bbd34bff6560a9382bd4eb1598ee51983
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:39:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:18 2026 +0200

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b4a671acf151dec87bc99bc2547e73149bd3c55e
    master date: 2026-09-03 09:45:16 +0100
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index 26bb7f6a3c..0a9505b5a4 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -73,8 +73,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, 1);
 
     if ( rc < 0 )
@@ -90,7 +91,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:57:56 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:57:56 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414425.1644216 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTc-0004wy-GP; Thu, 10 Sep 2026 10:57:56 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414425.1644216; Thu, 10 Sep 2026 10:57:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTc-0004wr-E2; Thu, 10 Sep 2026 10:57:56 +0000
Received: by outflank-mailman (input) for mailman id 1414425;
 Thu, 10 Sep 2026 10:57:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cTa-0004wl-JI
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:57:54 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTa-0084a7-0n
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTa-002SRE-1k
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:57:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=dAL32K0+aG91frAbAwbgRPtfQMKjmclC+9Q79ptCAG0=; b=2HhOwkFRe+hN8anvvy9duQN9O8
	//Yp0Iy7nIn2RINUKwuw08v0L/fXemEW6U3CYCmo+6vyH2nmWSBsbFEybMaXR1jMEkyfXNLRpWaR8
	UvZdMWWYB2g+bdo3E16w0qTq4QkRvVR5cuzZ6COTCzQaMMSt+JXCDP+fp4/1XAXbpid4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x4cTa-002SRE-1k@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:57:54 +0000

commit 754fda48d31a566136a0973e8af01f8990949c02
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:39:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:35 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: f7eab298bb9f2634e555aea1db70efcbbfd4d316
    master date: 2026-09-08 09:50:48 +0200
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index d759cccee3..10dc4a9562 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -259,7 +259,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:58:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:58:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414426.1644221 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTm-0004z2-I2; Thu, 10 Sep 2026 10:58:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414426.1644221; Thu, 10 Sep 2026 10:58:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTm-0004yu-FR; Thu, 10 Sep 2026 10:58:06 +0000
Received: by outflank-mailman (input) for mailman id 1414426;
 Thu, 10 Sep 2026 10:58:04 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cTk-0004ym-Ly
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:58:04 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTk-0084aO-13
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:58:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTk-002TCn-20
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:58:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=pdASnpM7u2ZuDpv8LKR/GeG2sSd1cAfPBPzsphZkiUM=; b=FJxVYPQI39aRRYzMGJ4Rozjm9t
	tv4YJITiB2UOnuRVFfu9/K2ZUh0bcNvOu+92yPKitQt1Qc+44UrxXeOAl53u1ubE+2NvFTSjySfRf
	p88X8z8rvvYL1pwhFN78iM265LMcfaK5ch91YZqbgGI6iSuurfr9ni6G/IrK1lXVrJvw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4cTk-002TCn-20@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:58:04 +0000

commit 568e954b5af46b0750a92128b5d45d42e1eecb1f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:39:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:45 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    master commit: 5df9425a733ea42613d2f414ec88d2c770ea4c20
    master date: 2026-09-09 14:15:15 +0200
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 7b12005bea..cbb46df3df 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -28,10 +28,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 10:58:16 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 10:58:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414427.1644225 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTw-00050x-Jb; Thu, 10 Sep 2026 10:58:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414427.1644225; Thu, 10 Sep 2026 10:58:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cTw-00050r-Gl; Thu, 10 Sep 2026 10:58:16 +0000
Received: by outflank-mailman (input) for mailman id 1414427;
 Thu, 10 Sep 2026 10:58:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cTu-00050k-OZ
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 10:58:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTu-0084aW-1J
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:58:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cTu-002U1Y-2H
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 10:58:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=O9WAJal3EpHIq52WljO9mHudDH680Ju9XD/a4Gfew00=; b=hAWZkHWtQJ1glMBxx8mtaJWBiK
	6OHd1vU5cSAqYJjgmvLu2JlOTh6dYLyKfTZgW+g+Ip58f0fPngQDecbypclGYyNjZHpS0w84MbiVd
	5ZxDrdQXyH0JHZtgg6mf0zJqdflrV7xMdl6sDKjDSeuWt2PaLmiCoojY4XoQICZbXm2Y=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4cTu-002U1Y-2H@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 10:58:14 +0000

commit afd8175444ed7be2a3c1ab5f6ad542d082414ddc
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:40:03 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:40:03 2026 +0200

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    master commit: 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
    master date: 2026-09-09 18:07:32 +0100
---
 xen/arch/x86/cpu/microcode/intel.c | 42 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index 3f8e9ca63b..368bbb18cc 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -24,6 +24,7 @@
 #include <xen/err.h>
 #include <xen/init.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/system.h>
 
@@ -269,6 +270,46 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
+         boot_cpu_data.x86 == 6 &&
+         boot_cpu_data.x86_model == INTEL_FAM6_GRANITERAPIDS_X &&
+         boot_cpu_data.x86_mask == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -361,6 +402,7 @@ static struct microcode_patch *cf_check cpu_request_microcode(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 11:00:02 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 11:00:02 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414432.1644238 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cVe-0005kI-UD; Thu, 10 Sep 2026 11:00:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414432.1644238; Thu, 10 Sep 2026 11:00:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cVe-0005js-RF; Thu, 10 Sep 2026 11:00:02 +0000
Received: by outflank-mailman (input) for mailman id 1414432;
 Thu, 10 Sep 2026 11:00:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cVd-0005U8-Ja
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 11:00:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cVd-0084e0-0p
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 11:00:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cVd-002cib-1k
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 11:00:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Nexw9BaTZIUv+ECkD4uviKqAHUlNtrI5JS3unR8L2Co=; b=4iKdBht9uGuPDj0ze35TS3fpOy
	ouZgIBnFHSIaadYHhcKf/PEKGjgpxjWm2S0+3kr4CKz9pVzhPa6QIP8DZmZqooFkYFwhLCoCylsNC
	6S+/at7t115CF7WlVGOM4aB3K9JxTgiYqmQcE8HfGvw3egq+Iw55q8G31r+szH9u6bo8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/rcu: fix types
Message-Id: <E1x4cVd-002cib-1k@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 11:00:01 +0000

commit fff00f1826d878f41aa55e9ebd78f6b210a72996
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Wed Sep 2 14:52:34 2026 +0200
Commit:     Roger Pau Monne <roger@xenproject.org>
CommitDate: Thu Sep 10 11:54:12 2026 +0200

    xen/rcu: fix types
    
    Adjust some types: int -> bool, int -> unsigned int. Also fix a couple of
    typos plus trailing white space.
    
    No functional change intended.
    
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/common/rcupdate.c      | 12 ++++++------
 xen/include/xen/rcupdate.h |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index fd5d3d7484..3b96f829c8 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -509,18 +509,18 @@ static int __rcu_pending(struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
     return 0;
 }
 
-int rcu_pending(int cpu)
+bool rcu_pending(unsigned int cpu)
 {
-    return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
+    return !!__rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu));
 }
 
 /*
  * Check to see if any future RCU-related work will need to be done
  * by the current CPU, even if none need be done immediately, returning
- * 1 if so.  This function is part of the RCU implementation; it is -not-
+ * true if so.  This function is part of the RCU implementation; it is -not-
  * an exported member of the RCU API.
  */
-int rcu_needs_cpu(int cpu)
+bool rcu_needs_cpu(unsigned int cpu)
 {
     struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
 
@@ -529,7 +529,7 @@ int rcu_needs_cpu(int cpu)
 
 /*
  * Timer for making sure the CPU where a callback is queued does
- * periodically poke rcu_pedning(), so that it will invoke the callback
+ * periodically poke rcu_pending(), so that it will invoke the callback
  * not too late after the end of the grace period.
  */
 static void rcu_idle_timer_start(void)
@@ -588,7 +588,7 @@ static void cf_check rcu_idle_timer_handler(void* data)
                                 IDLE_TIMER_PERIOD_MIN);
 }
 
-void rcu_check_callbacks(int cpu)
+void rcu_check_callbacks(unsigned int cpu)
 {
     struct rcu_data *rdp = &this_cpu(rcu_data);
 
diff --git a/xen/include/xen/rcupdate.h b/xen/include/xen/rcupdate.h
index 95f4ad81c4..c57f628107 100644
--- a/xen/include/xen/rcupdate.h
+++ b/xen/include/xen/rcupdate.h
@@ -77,8 +77,8 @@ struct rcu_head {
 } while (0)
 
 
-int rcu_pending(int cpu);
-int rcu_needs_cpu(int cpu);
+bool rcu_pending(unsigned int cpu);
+bool rcu_needs_cpu(unsigned int cpu);
 
 /*
  * Dummy lock type for passing to rcu_read_{lock,unlock}. Currently exists
@@ -168,10 +168,10 @@ static inline void rcu_read_unlock(rcu_read_lock_t *lock)
 #define rcu_assign_pointer(p, v) ({ smp_wmb(); (p) = (v); })
 
 void rcu_init(void);
-void rcu_check_callbacks(int cpu);
+void rcu_check_callbacks(unsigned int cpu);
 
 /* Exported interfaces */
-void call_rcu(struct rcu_head *head, 
+void call_rcu(struct rcu_head *head,
               void (*func)(struct rcu_head *head));
 
 void rcu_barrier(void);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 11:00:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 11:00:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414434.1644242 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cVo-0006W7-VK; Thu, 10 Sep 2026 11:00:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414434.1644242; Thu, 10 Sep 2026 11:00:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cVo-0006Vz-Sb; Thu, 10 Sep 2026 11:00:12 +0000
Received: by outflank-mailman (input) for mailman id 1414434;
 Thu, 10 Sep 2026 11:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cVo-0006Vq-6u
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 11:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cVn-0084gK-15
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 11:00:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cVn-002dfw-23
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 11:00:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=xzOzapfhmWCQOuCLC1W7moBmxI/huvLoJAhc18oRvtM=; b=DFU4smMGh0MOE05dGOgTQgZSR6
	bXTZDEJNpGSFztOyr8vCdAvR1eDkwnHagcXHHHPa9d4OH+HMhB5sPYIQWFu/0XpFpFu2STxNlb9hr
	PjD8poyrIOSh6BkT7J0MUxXQ8qbloBEohB6I8WHF/3/YHt3bnzRwmxPihJ4rX9hiEZys=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/rcu: sort includes
Message-Id: <E1x4cVn-002dfw-23@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 11:00:11 +0000

commit 0ea57a11f5a285ed4b8744f2e16b1966ebcf350e
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Wed Sep 2 16:19:09 2026 +0200
Commit:     Roger Pau Monne <roger@xenproject.org>
CommitDate: Thu Sep 10 11:54:12 2026 +0200

    xen/rcu: sort includes
    
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/common/rcupdate.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c
index 3b96f829c8..c1b6b2ae76 100644
--- a/xen/common/rcupdate.c
+++ b/xen/common/rcupdate.c
@@ -31,21 +31,22 @@
  * For detailed explanation of Read-Copy Update mechanism see -
  * http://lse.sourceforge.net/locking/rcupdate.html
  */
-#include <xen/types.h>
-#include <xen/kernel.h>
+#include <xen/bitops.h>
+#include <xen/cpu.h>
 #include <xen/init.h>
+#include <xen/kernel.h>
 #include <xen/param.h>
-#include <xen/sections.h>
-#include <xen/spinlock.h>
-#include <xen/smp.h>
+#include <xen/percpu.h>
 #include <xen/rcupdate.h>
 #include <xen/sched.h>
-#include <asm/atomic.h>
-#include <xen/bitops.h>
-#include <xen/percpu.h>
+#include <xen/sections.h>
+#include <xen/smp.h>
 #include <xen/softirq.h>
-#include <xen/cpu.h>
+#include <xen/spinlock.h>
 #include <xen/stop_machine.h>
+#include <xen/types.h>
+
+#include <asm/atomic.h>
 
 DEFINE_PER_CPU(unsigned int, rcu_lock_cnt);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 11:00:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 11:00:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414436.1644246 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cVz-0006a0-0R; Thu, 10 Sep 2026 11:00:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414436.1644246; Thu, 10 Sep 2026 11:00:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4cVy-0006Zq-Tw; Thu, 10 Sep 2026 11:00:22 +0000
Received: by outflank-mailman (input) for mailman id 1414436;
 Thu, 10 Sep 2026 11:00:21 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4cVx-0006Za-Ok
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 11:00:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cVx-0084gO-1L
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 11:00:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4cVx-002eWH-2J
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 11:00:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0FO01Sp7xMgj6Dakjg4jVtnoP/N3WsHhul2/rDV2++E=; b=NzglcATauAEozyeJanDquKtKbh
	WH1F2Hv+RzHvmMxfMyzwlUnDhLsyNx1X6mBApgyDUEy8Gxpsj0ff5dk6uKkBvpUiarroPLTcztAVB
	BPKUJMwjoh36ztj2k4AYn07DCgylC6QlrUB0to+gVa+spVM4sgyG3e4fqkjIPoF/vhtE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/mm: limit deferred TLB flushing to PV domain support
Message-Id: <E1x4cVx-002eWH-2J@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 11:00:21 +0000

commit d7bf1b8ea2756b6160d41bf377a85365dbd6f8f6
Author:     Roger Pau Monne <roger@xenproject.org>
AuthorDate: Mon Jul 27 16:36:15 2026 +0200
Commit:     Roger Pau Monne <roger@xenproject.org>
CommitDate: Thu Sep 10 11:54:12 2026 +0200

    x86/mm: limit deferred TLB flushing to PV domain support
    
    The current logic on x86 will mark all domain owned pages as needing a TLB
    flush before being re-used.  However such TLB flushing is only strictly
    needed when the pages might have been mapped by a PV domain, as those can
    keep a reference to the page in the TLB after it has been freed.
    
    Limit the flushing to builds with PV domain support, as tracking whether a
    page might have been mapped by a PV domain is not trivial (and possibly not
    worth the extra logic).
    
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/common/page_alloc.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 62ac89b824..fe150eccd7 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1538,8 +1538,13 @@ static bool mark_page_free(struct page_info *pg, mfn_t mfn)
         BUG();
     }
 
-    /* If a page has no owner it will need no safety TLB flush. */
-    pg->u.free.need_tlbflush = (page_get_owner(pg) != NULL);
+    /*
+     * If a page has no owner and there's no PV domain support it does not need
+     * a safety TLB flush.  PV domains are the only domain types that can keep
+     * stale entries on the TLB, as they have (limited) control over the host
+     * MMU and when flushes are performed.
+     */
+    pg->u.free.need_tlbflush = IS_ENABLED(CONFIG_PV) && page_get_owner(pg);
     if ( pg->u.free.need_tlbflush )
         page_set_tlbflush_timestamp(pg);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:55:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:55:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414618.1644369 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eIx-0001If-66; Thu, 10 Sep 2026 12:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414618.1644369; Thu, 10 Sep 2026 12:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eIx-0001IX-3O; Thu, 10 Sep 2026 12:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1414618;
 Thu, 10 Sep 2026 12:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eIw-0001IP-AS
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eIv-0087MX-27
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eIv-00BbAb-32
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=mf6D8P+whDHcLjo6eivPEKlkXfNLbDpJ9yTcssNOfGE=; b=Y6R1hiNTEW1XJ7FcPxVZTeIHcX
	rxepz5V3WDLSS94/k9lCaF0U8VXDNOEJHUIXfm9FRJtw7ziqx3L7jG83uZ6vzqXn5VgPlHU7WAFIF
	KYCutYKMqyRCb3eJx3bziBGxK7zBT/FhItj31A7Z13FFzBIYk9urCy59T7CPlFOQMGYI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/vpci: allow unaligned accesses by the hardware domain
Message-Id: <E1x4eIv-00BbAb-32@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:55:01 +0000

commit 0822a2e890e93d4e1d0c99c8a5062a317788f3ae
Author:     Roger Pau Monné <roger@xenproject.org>
AuthorDate: Thu Sep 10 12:31:05 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:31:05 2026 +0200

    xen/vpci: allow unaligned accesses by the hardware domain
    
    It's possible for domains to generate unaligned PCI config space accesses
    when using ECAM, and hence vPCI should support those at least for the
    hardware domain.  Such unaligned accesses to the PCI config space have been
    reported to come from ACPI logic.
    
    Relax the checking in vpci_access_allowed() to allow such accesses for the
    hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
    fulfill them using MMCFG.
    
    MMCFG regions are identity exposed to the hardware domain, and hence such
    unaligned accesses can only come as a result of the host having MMCFG in the
    first place, as otherwise MMCFG won't be exposed to the hardware domain
    either.
    
    Note that vpci_ecam_{read,write}() already refuse accesses that cross a
    device boundary unconditionally.
    
    Reported-by: Jason Andryuk <jason.andryuk@amd.com>
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
    master commit: 79175b13906936855ae354f696f16093e5e29446
    master date: 2026-08-26 11:50:42 +0200
---
 tools/include/xen-tools/common-macros.h | 2 ++
 xen/arch/x86/x86_64/pci.c               | 8 ++++----
 xen/drivers/vpci/vpci.c                 | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 88b4a0e5a6..1f9146b23b 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -68,6 +68,8 @@
     })
 #endif
 
+#define IS_ALIGNED(val, align) (!((val) & ((align) - 1)))
+
 #define ROUNDUP(x, a) (((x) + (a) - 1) & ~((a) - 1))
 #define ROUNDDOWN(x, a) ((x) & ~((a) - 1))
 
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 8d33429103..6298141c3c 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -26,7 +26,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
 uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
     {
         uint32_t value;
 
@@ -39,7 +39,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 
 uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
     {
         uint32_t value;
 
@@ -60,7 +60,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
@@ -68,7 +68,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index 0ac9ec8b04..9e2c27e3a3 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -685,6 +685,8 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned int size,
 /* Helper function to check an access size and alignment on vpci space. */
 bool vpci_access_allowed(unsigned int reg, unsigned int len)
 {
+    const struct domain *currd = current->domain;
+
     /* Check access size. */
     if ( len != 1 && len != 2 && len != 4 && len != 8 )
         return false;
@@ -695,8 +697,8 @@ bool vpci_access_allowed(unsigned int reg, unsigned int len)
         return false;
 #endif
 
-    /* Check that access is size aligned. */
-    if ( (reg & (len - 1)) )
+    /* Refuse unaligned accesses for non-hardware domains. */
+    if ( !is_hardware_domain(currd) && !IS_ALIGNED(reg, len) )
         return false;
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:55:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:55:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414620.1644373 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJ7-0001L0-7W; Thu, 10 Sep 2026 12:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414620.1644373; Thu, 10 Sep 2026 12:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJ7-0001Kq-4o; Thu, 10 Sep 2026 12:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1414620;
 Thu, 10 Sep 2026 12:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eJ6-0001Kk-3a
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJ5-0087Mb-2R
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJ6-00Bbvf-09
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=21eQXZhme41VR2g/4CyJTn5FQf1/Ph+o6Duc4P5qrWg=; b=KQ+KWg3IWt/4KkArZ0IutRbXkh
	mX2+ji0opW2s7GLseXgAswG9A2j+wDSDYkM/QNvfMpPqqT3btcJOoIDJJOoSHlcBHKChjBdPF+Ab9
	RLVkVEimT3MhvamJXayBdzLM9zxmRnPN9j7DG3MsmuURFb3xL1FigmgNzFHtRn9oZ+0Q=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x4eJ6-00Bbvf-09@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:55:12 +0000

commit f692b1badf84233e0bd905778bd284b4df7ff935
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Thu Sep 10 12:31:47 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:31:47 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    master commit: 2565341135f88081535f6830a6256277e2834403
    master date: 2026-09-01 10:02:13 +0200
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 9ccf5811bf..67ae5a7968 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -584,7 +584,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -864,8 +864,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414621.1644378 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJH-0001No-9K; Thu, 10 Sep 2026 12:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414621.1644378; Thu, 10 Sep 2026 12:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJH-0001Nf-67; Thu, 10 Sep 2026 12:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1414621;
 Thu, 10 Sep 2026 12:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eJG-0001NN-6k
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJF-0087Mf-2j
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJG-00Bcqq-0R
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=fH+joPWRBEP9HD6Hu2JRmCZojfhtXspRTwsfXVIwjHc=; b=SYjNLdWkuU4861pXbwF68hP4fx
	PA9Xp1+hRjJn0/2++9eMUoX58UqOk0y0ZnnNlM062+AxcuX43O6kOVdc+Ux4vBjDtm/q8d+6RfZ5L
	YKEQIs8SZlzaR2ZwPnTQPyzGDp+H9UNThwDWDM8Xf2SrAbyrE7YlJMFmV++pavchJQ9w=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x4eJG-00Bcqq-0R@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:55:22 +0000

commit 2bd89c0ef37be571f1fdd93755ddda9817384d42
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:32:20 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:32:20 2026 +0200

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b4a671acf151dec87bc99bc2547e73149bd3c55e
    master date: 2026-09-03 09:45:16 +0100
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index fd0715fb6a..34dce6d9bb 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -76,8 +76,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, 1);
 
     if ( rc < 0 )
@@ -93,7 +94,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414622.1644381 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJR-0001QQ-AC; Thu, 10 Sep 2026 12:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414622.1644381; Thu, 10 Sep 2026 12:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJR-0001QI-7b; Thu, 10 Sep 2026 12:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1414622;
 Thu, 10 Sep 2026 12:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eJQ-0001Q9-9L
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJP-0087Mj-31
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJQ-00BdRE-0i
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=1IzOcJTiuESHxIBkNtS2jbHN6ElOv821QZh1Q0X77Pw=; b=vpEcg0qzkM7p7IVA8j1nQD50pQ
	EgB3P7Wvucjrf6rKyfXx9hUJ4UlzK67kOpyhV/gSuuLtWz1jVz9KmoaoSAhSDZo7gAejRFPtgMAK+
	bkA0W9xAwwXl6MSn9Du7D6avIFeGy8vLfJCoa6Bo75b3JOiaKbXmgOvAH47o+Sd7r7+o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] libacpi: drop mk_dsdt's -d / --debug option
Message-Id: <E1x4eJQ-00BdRE-0i@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:55:32 +0000

commit a9df8eb103bdb94986fbd6c85e0feb3b6fca07c1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:32:40 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:32:40 2026 +0200

    libacpi: drop mk_dsdt's -d / --debug option
    
    Recent Clang complains about the "debug" static variable only ever being
    written to. Drop it and the command line option controlling it.
    
    Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
    master commit: f907784c320da65c912ea04ed9f83f29e59dbd87
    master date: 2026-09-07 14:11:35 +0200
---
 tools/libacpi/Makefile  | 8 ++++----
 tools/libacpi/mk_dsdt.c | 7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index 193ec78672..3b4c3d8c86 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSD
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
@@ -51,17 +51,17 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl  $(MK_DSDT)
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
 	cat dsdt_acpi_info.asl >> $@
-	$(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@
+	$(MK_DSDT) --maxcpu any --dm-version none >> $@
 
 $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 3, \"Xen\", \"ARM\", 1)\n{" > $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index f71de6c8c6..001c3875c3 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -15,7 +15,6 @@
 #endif
 
 static unsigned int indent_level;
-static bool debug = false;
 
 typedef enum dm_version {
     QEMU_NONE,
@@ -73,7 +72,6 @@ static struct option options[] = {
 #ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
 #endif
-    { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
@@ -125,10 +123,7 @@ int main(int argc, char **argv)
             }
             break;
 #endif
-        case 'd':
-            if (*optarg == 'y')
-                debug = true;
-            break;
+
         default:
             return -1;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:55:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:55:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414630.1644386 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJb-0001TK-Bn; Thu, 10 Sep 2026 12:55:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414630.1644386; Thu, 10 Sep 2026 12:55:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJb-0001TB-8w; Thu, 10 Sep 2026 12:55:43 +0000
Received: by outflank-mailman (input) for mailman id 1414630;
 Thu, 10 Sep 2026 12:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eJa-0001T3-C8
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJa-0087Mn-03
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJa-00Be6O-10
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=6lEzdT8+kiei+5mdSVFYfLEl0Geesi5nJJMuudG3nu4=; b=kG6i4SKj7j5JIFj9yVrZi4xG8H
	cfb98IVcmytgozyVEUS3hCpVRfoIPE/ylG3Mez2Zvca9+8h8JsdG8TjEMYWuILCjxJjhTMDgOPY2m
	oGkDQeOr1aO6KfFsYSECylb3rULYi3FtWsBVj64zH404zAvWF+/DODD9m62iKZIbKWV0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x4eJa-00Be6O-10@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:55:42 +0000

commit 2896911c958d477ab8fbd4436aae62bceef5ca73
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:32:54 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:32:54 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: f7eab298bb9f2634e555aea1db70efcbbfd4d316
    master date: 2026-09-08 09:50:48 +0200
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 179eb20f4e..7ebfb0b7e3 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -263,7 +263,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:55:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:55:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414631.1644389 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJl-0001Vc-Cn; Thu, 10 Sep 2026 12:55:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414631.1644389; Thu, 10 Sep 2026 12:55:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJl-0001VU-AG; Thu, 10 Sep 2026 12:55:53 +0000
Received: by outflank-mailman (input) for mailman id 1414631;
 Thu, 10 Sep 2026 12:55:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eJk-0001VO-Eh
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:55:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJk-0087Mr-0K
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJk-00BegT-1H
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=GwTkllWwe+3XnxomsAB+ODYTkVQiUqUPOcDsxvwMJyI=; b=f2nsTNyJ3pU+lkSPbqlJrhXzB9
	N4bffa9I5hdf2We5CGn+mrRSS7X6iJwjy48/stUbC3k+0UE+vl40J4fNxQ603LWZs0rzCMRO91RfS
	Qg4jdaq0uzX4WV2Z0mg3K9R9/kziGLjE288hzKtjgQl5HT2bxUc5iUW720YUH+Sxq/Ks=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4eJk-00BegT-1H@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:55:52 +0000

commit cc07f4b05803b89a7a6a78c8324da5aba9a192d9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:33:11 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:33:11 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    master commit: 5df9425a733ea42613d2f414ec88d2c770ea4c20
    master date: 2026-09-09 14:15:15 +0200
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index f91ba6f740..b1462883ec 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -27,10 +27,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 12:56:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 12:56:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414632.1644393 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJv-0001Xa-EH; Thu, 10 Sep 2026 12:56:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414632.1644393; Thu, 10 Sep 2026 12:56:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eJv-0001XS-Be; Thu, 10 Sep 2026 12:56:03 +0000
Received: by outflank-mailman (input) for mailman id 1414632;
 Thu, 10 Sep 2026 12:56:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eJu-0001XK-HE
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 12:56:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJu-0087NU-0a
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:56:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eJu-00BfGO-1X
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 12:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IOKRk+nJ9wUxJOlBjl2m4nF5Ghc5pfXodQ8tNjDB4Bg=; b=m14btVgmxb8qSZ4hcckZRIX6GN
	zwoqioM0Dpi4MtuYWqz9OShQP3oGo7asV1xR0t8Rs6AXPzJrrnDxapFaGFjJolaQBcWwPVMKT/uTR
	MVLOm7SXguRYRnhxp66VN8k5GPuuqM9NEh/pNeg1kEcKHuYIZ+ZyJWkoAQ56kwgZXnnQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4eJu-00BfGO-1X@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 12:56:02 +0000

commit b8fe9e33743c7a387b67fee9d288dcb5c49f3813
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:33:25 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:33:25 2026 +0200

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    master commit: 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
    master date: 2026-09-09 18:07:32 +0100
---
 xen/arch/x86/cpu/microcode/intel.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index c45b00c6b0..425bfc1045 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -27,6 +27,7 @@
 #include <xen/string.h>
 #include <xen/xmalloc.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -273,6 +274,44 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.vfm == INTEL_GRANITERAPIDS_X &&
+         boot_cpu_data.stepping == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -365,6 +404,7 @@ static struct microcode_patch *cf_check intel_ucode_parse(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:11:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:11:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414678.1644415 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYR-00059O-UK; Thu, 10 Sep 2026 13:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414678.1644415; Thu, 10 Sep 2026 13:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYR-00059G-Rn; Thu, 10 Sep 2026 13:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1414678;
 Thu, 10 Sep 2026 13:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eYQ-00059A-LE
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYQ-0087g3-0R
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYQ-00D1pl-1M
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IzRCHE/JIdDfkG3Q9mzIjNxLfejnjJ1wzleRAjjAsIs=; b=iTLkKfEZOJ8xPfJb605zhgNGo7
	p97g/G3PwNrq/+RP6S5TdWCWriHfXTZgnZJLrm73V3DMqd0kcFVUAdsF/fnt1pBXhJN8HsJCZECqP
	REiBSPQG9kTBpyqdPpnUOcvDQrCgXgGkFA7k3s/Gh/IQBFL3pAh/bIdWyIOS6xgTwbC0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/vpci: allow unaligned accesses by the hardware domain
Message-Id: <E1x4eYQ-00D1pl-1M@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:11:02 +0000

commit 93b05680e3ee093d6946b106e5e72abb34ba1a44
Author:     Roger Pau Monné <roger@xenproject.org>
AuthorDate: Thu Sep 10 12:34:38 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:34:38 2026 +0200

    xen/vpci: allow unaligned accesses by the hardware domain
    
    It's possible for domains to generate unaligned PCI config space accesses
    when using ECAM, and hence vPCI should support those at least for the
    hardware domain.  Such unaligned accesses to the PCI config space have been
    reported to come from ACPI logic.
    
    Relax the checking in vpci_access_allowed() to allow such accesses for the
    hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
    fulfill them using MMCFG.
    
    MMCFG regions are identity exposed to the hardware domain, and hence such
    unaligned accesses can only come as a result of the host having MMCFG in the
    first place, as otherwise MMCFG won't be exposed to the hardware domain
    either.
    
    Note that vpci_ecam_{read,write}() already refuse accesses that cross a
    device boundary unconditionally.
    
    Reported-by: Jason Andryuk <jason.andryuk@amd.com>
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
    master commit: 79175b13906936855ae354f696f16093e5e29446
    master date: 2026-08-26 11:50:42 +0200
---
 tools/include/xen-tools/common-macros.h | 2 ++
 xen/arch/x86/x86_64/pci.c               | 8 ++++----
 xen/drivers/vpci/vpci.c                 | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 9838a108aa..06690e92fd 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -68,6 +68,8 @@
     })
 #endif
 
+#define IS_ALIGNED(val, align) (!((val) & ((align) - 1)))
+
 #ifndef ROUNDUP
 #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 #endif
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 8d33429103..6298141c3c 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -26,7 +26,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
 uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
     {
         uint32_t value;
 
@@ -39,7 +39,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 
 uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
     {
         uint32_t value;
 
@@ -60,7 +60,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
@@ -68,7 +68,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index 07c7071d0a..1e088e20d6 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -927,6 +927,8 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned int size,
 /* Helper function to check an access size and alignment on vpci space. */
 bool vpci_access_allowed(unsigned int reg, unsigned int len)
 {
+    const struct domain *currd = current->domain;
+
     /* Check access size. */
     if ( len != 1 && len != 2 && len != 4 && len != 8 )
         return false;
@@ -937,8 +939,8 @@ bool vpci_access_allowed(unsigned int reg, unsigned int len)
         return false;
 #endif
 
-    /* Check that access is size aligned. */
-    if ( (reg & (len - 1)) )
+    /* Refuse unaligned accesses for non-hardware domains. */
+    if ( !is_hardware_domain(currd) && !IS_ALIGNED(reg, len) )
         return false;
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:11:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:11:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414680.1644419 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYb-0005CP-Vo; Thu, 10 Sep 2026 13:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414680.1644419; Thu, 10 Sep 2026 13:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYb-0005CH-T9; Thu, 10 Sep 2026 13:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1414680;
 Thu, 10 Sep 2026 13:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eYa-0005C9-JP
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYa-0087g7-0k
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYa-00D2b4-1f
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=XELUU6UbkWARFG13SuhkYM4XO3O71e9ZeSNFn3cUcFw=; b=LrdwuLkkg6rCcfGTLS3nYUm/QA
	JtsHUUV215VegmpA5gbnOOwPLbLSS6srVcfOCaXgpFbV0r2GlKFCVN01DLEZf2U1ZYp+SeTXvprj5
	Foylg/jYX/kZf58P1rmdIR6+bLINgw78SIzPW9VIG/BnE5GLHMUxQIaUntRCzhiNk/JE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x4eYa-00D2b4-1f@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:11:12 +0000

commit 839d930f4eb9d78b5f5ca249cea15d2c4efd5cf7
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Thu Sep 10 12:35:02 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:02 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    master commit: 2565341135f88081535f6830a6256277e2834403
    master date: 2026-09-01 10:02:13 +0200
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index a374e59a84..90ec975398 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -565,7 +565,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -845,8 +845,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:11:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:11:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414681.1644423 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYm-0005Eg-0q; Thu, 10 Sep 2026 13:11:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414681.1644423; Thu, 10 Sep 2026 13:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYl-0005EY-US; Thu, 10 Sep 2026 13:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1414681;
 Thu, 10 Sep 2026 13:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eYk-0005EP-Lg
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYk-0087gB-11
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYk-00D3RN-1x
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=T2gQVd+yGg806LSQKalPQ1RwTz7BoSS8gIBMp9b8U/I=; b=V/hqyEx6y3S621ODCNhMEVGSh9
	IjAls25oM0XKoTnWZZBZqUAO3/YD+4r8kNl2gSPGIkyGq2Ul5WYdi/zvggpxc68UNckVv6tMPLsoS
	lsAs5GkN/jPPSYY82OJ/gKhRORVbXYiT/Kq/WRctW852tk1l1lbJt05UyQEyDtmPxsBo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x4eYk-00D3RN-1x@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:11:22 +0000

commit d00962f021be1d70a8eaa0c0505aea601d75ab76
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:35:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:18 2026 +0200

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b4a671acf151dec87bc99bc2547e73149bd3c55e
    master date: 2026-09-03 09:45:16 +0100
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index fd0715fb6a..34dce6d9bb 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -76,8 +76,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, 1);
 
     if ( rc < 0 )
@@ -93,7 +94,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:11:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:11:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414682.1644426 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYv-0005Gm-24; Thu, 10 Sep 2026 13:11:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414682.1644426; Thu, 10 Sep 2026 13:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eYu-0005Ge-Vi; Thu, 10 Sep 2026 13:11:32 +0000
Received: by outflank-mailman (input) for mailman id 1414682;
 Thu, 10 Sep 2026 13:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eYu-0005GT-OR
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYu-0087gJ-1J
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eYu-00D49B-2E
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=tre9cPXBgq345/mDDc/MUjpy/ezKfx2pbKftLpTDPlQ=; b=YZ71t/6HQogkclI3qJ6TXUE0ZN
	229GBAng8DirhdF9l3rOrmNMb5cvUEYjzR7qAzwWPWa27ZS/NfwGVLJwQUob3GiV7Jo/dQKajSmzV
	aZ1/J8eu6q8YnX8YrkesjsFBReEvpPUnBj7AkAxl9SD0B82QMQ9d1CJ7SBocVAgGz6rY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] libacpi: drop mk_dsdt's -d / --debug option
Message-Id: <E1x4eYu-00D49B-2E@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:11:32 +0000

commit 52f07993948541b9583c36462be20d2a948d9639
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:35:39 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:39 2026 +0200

    libacpi: drop mk_dsdt's -d / --debug option
    
    Recent Clang complains about the "debug" static variable only ever being
    written to. Drop it and the command line option controlling it.
    
    Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
    master commit: f907784c320da65c912ea04ed9f83f29e59dbd87
    master date: 2026-09-07 14:11:35 +0200
---
 tools/libacpi/Makefile  | 8 ++++----
 tools/libacpi/mk_dsdt.c | 7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index 193ec78672..3b4c3d8c86 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSD
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
@@ -51,17 +51,17 @@ $(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl  $(MK_DSDT)
 	# Remove last bracket
 	awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX)
 	cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) --maxcpu $* --dm-version qemu-xen >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
 	cat dsdt_acpi_info.asl >> $@
-	$(MK_DSDT) --debug=$(debug) --maxcpu any --dm-version none >> $@
+	$(MK_DSDT) --maxcpu any --dm-version none >> $@
 
 $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
 	printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 3, \"Xen\", \"ARM\", 1)\n{" > $@.$(TMP_SUFFIX)
-	$(MK_DSDT) --debug=$(debug) >> $@.$(TMP_SUFFIX)
+	$(MK_DSDT) >> $@.$(TMP_SUFFIX)
 	mv -f $@.$(TMP_SUFFIX) $@
 
 $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index f71de6c8c6..001c3875c3 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -15,7 +15,6 @@
 #endif
 
 static unsigned int indent_level;
-static bool debug = false;
 
 typedef enum dm_version {
     QEMU_NONE,
@@ -73,7 +72,6 @@ static struct option options[] = {
 #ifdef CONFIG_X86
     { "dm-version", 1, 0, 'q' },
 #endif
-    { "debug", 1, 0, 'd' },
     { 0, 0, 0, 0 }
 };
 
@@ -125,10 +123,7 @@ int main(int argc, char **argv)
             }
             break;
 #endif
-        case 'd':
-            if (*optarg == 'y')
-                debug = true;
-            break;
+
         default:
             return -1;
         }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:11:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:11:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414684.1644432 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eZ6-0005Im-40; Thu, 10 Sep 2026 13:11:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414684.1644432; Thu, 10 Sep 2026 13:11:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eZ6-0005Ie-0q; Thu, 10 Sep 2026 13:11:44 +0000
Received: by outflank-mailman (input) for mailman id 1414684;
 Thu, 10 Sep 2026 13:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eZ4-0005IW-Rm
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eZ4-0087gQ-1b
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eZ4-00D4l1-2W
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=V+SYPrs1PV+lw+oc9tKfeUZEvNo3q6oPsLQNKMpHNI8=; b=58PzJNvxi75OmgSSt+EhSQ0rS1
	6XG/fRBKsI6Uw6IMlOOSD6ohOS6t3Luwh4CkaPneiNm8hDYfCoyWtLzXax1HKHUyrD8C1qUmBcWEB
	HQ3QH8a0kbdjOZLeREm9m5mIITzbAL/d0quXIo5/15844thH/zvmd9f2g4wNncPVXSGM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x4eZ4-00D4l1-2W@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:11:42 +0000

commit 564411f65bed8dc6feb50c7f96af030e61ded1bd
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:35:52 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:35:52 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: f7eab298bb9f2634e555aea1db70efcbbfd4d316
    master date: 2026-09-08 09:50:48 +0200
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 24f447b957..e1a8194dfd 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -262,7 +262,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:11:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:11:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414685.1644435 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eZG-0005L5-5C; Thu, 10 Sep 2026 13:11:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414685.1644435; Thu, 10 Sep 2026 13:11:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eZG-0005Kw-2I; Thu, 10 Sep 2026 13:11:54 +0000
Received: by outflank-mailman (input) for mailman id 1414685;
 Thu, 10 Sep 2026 13:11:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eZE-0005Kn-U5
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:11:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eZE-0087gn-1s
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eZE-00D5Yx-2o
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:11:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=h/QoTenEy+6dYoJ4Dsv7z5G+Gg6/yhzuhgpAl+DHJXA=; b=RYAKd8onUGDE8xWoU+vPdPdcAn
	qE1Z95Xl8cjqPOmW1rraedVxbwqvnhHV6yNENx/e5MA9Ou7xRsb5dbqLOliif6vxRcFcPwbiHxQeo
	8GVceuFFhvjtUf69lvzRIWu876jVFT5aXlx0ga85EynrAqWf+bZGR/F0menlw3mXy5G4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4eZE-00D5Yx-2o@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:11:52 +0000

commit ed8c7aad59794f057138122f40873141e88673e9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:36:07 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:36:07 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    master commit: 5df9425a733ea42613d2f414ec88d2c770ea4c20
    master date: 2026-09-09 14:15:15 +0200
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 7b12005bea..cbb46df3df 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -28,10 +28,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:12:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:12:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414687.1644438 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eZQ-0005OC-6F; Thu, 10 Sep 2026 13:12:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414687.1644438; Thu, 10 Sep 2026 13:12:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4eZQ-0005O4-3h; Thu, 10 Sep 2026 13:12:04 +0000
Received: by outflank-mailman (input) for mailman id 1414687;
 Thu, 10 Sep 2026 13:12:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4eZP-0005Mt-0T
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:12:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eZO-0087h2-27
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:12:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4eZO-00D6K1-35
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:12:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=O/MppRTWt5zXajJV1uOcbARjhpw4S/sHkO7C7k8pcSI=; b=voWaIYXiJfhEfWzaReqzXehilB
	9g8NrKbQYTduPevB1Tgcu+88XBL7blfuJMF9EUpBB9U0XyOvPvyUfXQkcxrA0eSb+VWWm5sIv5Jmh
	hiIFTdwoUVJ5/W4G0kSz4Fytc9Z4WURCHDnJiMXCOhNbmApotAUsk7nUcncJTUfWL/5k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4eZO-00D6K1-35@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:12:02 +0000

commit 83f221c3cdffdd6ec1357b40479a9ba1d03a9df1
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:36:15 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:36:15 2026 +0200

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    master commit: 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
    master date: 2026-09-09 18:07:32 +0100
---
 xen/arch/x86/cpu/microcode/intel.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index 281993e725..2c8dec6b8b 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -27,6 +27,7 @@
 #include <xen/string.h>
 #include <xen/xmalloc.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -273,6 +274,44 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.vfm == INTEL_GRANITERAPIDS_X &&
+         boot_cpu_data.stepping == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -365,6 +404,7 @@ static struct microcode_patch *cf_check cpu_request_microcode(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:55:08 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:55:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414752.1644480 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fF1-0003Ev-OK; Thu, 10 Sep 2026 13:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414752.1644480; Thu, 10 Sep 2026 13:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fF1-0003Em-Ld; Thu, 10 Sep 2026 13:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1414752;
 Thu, 10 Sep 2026 13:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4fF0-0003Eg-3s
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fEz-0088UU-28
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fEz-00H2B5-31
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=J7VBdvcZgSQI60LY2IwxpcGxDAxHTpGpOIroJf2M3gE=; b=K1h3ZJX5wZVk3AygeI35mpBAx9
	sgEhc6r9sxCHsGhMFcIQ7O/Ht0hMHKcKWyN1TcqveYpstxsWzw9cbmjFfrV2elFC+cMiPwk8CEJx5
	DMoJcV+FMZWksHDdUmXdjePib+FN+wsLq8y3VKib8ikiekmMV3T5AMBjonqz45B4QTDs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/vpci: allow unaligned accesses by the hardware domain
Message-Id: <E1x4fEz-00H2B5-31@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:55:01 +0000

commit 5c619190583f5c129ba13a01342ff22920f5705d
Author:     Roger Pau Monné <roger@xenproject.org>
AuthorDate: Thu Sep 10 12:38:34 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:38:34 2026 +0200

    xen/vpci: allow unaligned accesses by the hardware domain
    
    It's possible for domains to generate unaligned PCI config space accesses
    when using ECAM, and hence vPCI should support those at least for the
    hardware domain.  Such unaligned accesses to the PCI config space have been
    reported to come from ACPI logic.
    
    Relax the checking in vpci_access_allowed() to allow such accesses for the
    hardware domain, and fix the handling in pci_conf_{read,write}{16,32}() to
    fulfill them using MMCFG.
    
    MMCFG regions are identity exposed to the hardware domain, and hence such
    unaligned accesses can only come as a result of the host having MMCFG in the
    first place, as otherwise MMCFG won't be exposed to the hardware domain
    either.
    
    Note that vpci_ecam_{read,write}() already refuse accesses that cross a
    device boundary unconditionally.
    
    Reported-by: Jason Andryuk <jason.andryuk@amd.com>
    Signed-off-by: Roger Pau Monné <roger@xenproject.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
    master commit: 79175b13906936855ae354f696f16093e5e29446
    master date: 2026-08-26 11:50:42 +0200
---
 tools/include/xen-tools/common-macros.h | 2 ++
 xen/arch/x86/x86_64/pci.c               | 8 ++++----
 xen/drivers/vpci/vpci.c                 | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/include/xen-tools/common-macros.h b/tools/include/xen-tools/common-macros.h
index 9838a108aa..06690e92fd 100644
--- a/tools/include/xen-tools/common-macros.h
+++ b/tools/include/xen-tools/common-macros.h
@@ -68,6 +68,8 @@
     })
 #endif
 
+#define IS_ALIGNED(val, align) (!((val) & ((align) - 1)))
+
 #ifndef ROUNDUP
 #define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
 #endif
diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c
index 8d33429103..6298141c3c 100644
--- a/xen/arch/x86/x86_64/pci.c
+++ b/xen/arch/x86/x86_64/pci.c
@@ -26,7 +26,7 @@ uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg)
 
 uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
     {
         uint32_t value;
 
@@ -39,7 +39,7 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg)
 
 uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
     {
         uint32_t value;
 
@@ -60,7 +60,7 @@ void pci_conf_write8(pci_sbdf_t sbdf, unsigned int reg, uint8_t data)
 
 void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 2) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 2, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2, data);
@@ -68,7 +68,7 @@ void pci_conf_write16(pci_sbdf_t sbdf, unsigned int reg, uint16_t data)
 
 void pci_conf_write32(pci_sbdf_t sbdf, unsigned int reg, uint32_t data)
 {
-    if ( sbdf.seg || reg > 255 )
+    if ( sbdf.seg || reg > 255 || !IS_ALIGNED(reg, 4) )
         pci_mmcfg_write(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, data);
     else
         pci_conf_write(PCI_CONF_ADDRESS(sbdf, reg), 0, 4, data);
diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
index 1e6aa5d799..62a7e676c4 100644
--- a/xen/drivers/vpci/vpci.c
+++ b/xen/drivers/vpci/vpci.c
@@ -633,6 +633,8 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsigned int size,
 /* Helper function to check an access size and alignment on vpci space. */
 bool vpci_access_allowed(unsigned int reg, unsigned int len)
 {
+    const struct domain *currd = current->domain;
+
     /* Check access size. */
     if ( len != 1 && len != 2 && len != 4 && len != 8 )
         return false;
@@ -643,8 +645,8 @@ bool vpci_access_allowed(unsigned int reg, unsigned int len)
         return false;
 #endif
 
-    /* Check that access is size aligned. */
-    if ( (reg & (len - 1)) )
+    /* Refuse unaligned accesses for non-hardware domains. */
+    if ( !is_hardware_domain(currd) && !IS_ALIGNED(reg, len) )
         return false;
 
     return true;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:55:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:55:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414754.1644484 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFB-0003GR-Pa; Thu, 10 Sep 2026 13:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414754.1644484; Thu, 10 Sep 2026 13:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFB-0003GJ-Mv; Thu, 10 Sep 2026 13:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1414754;
 Thu, 10 Sep 2026 13:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4fFA-0003G5-3n
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fF9-0088Ua-2S
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFA-00H3BV-0A
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=o98ANs6rpwGhqyw5MMo9droPPw5aqMVP9POmLwPfUc4=; b=X4Sha6COouYad9Xqn/DDSNzRz+
	22DLLOfbo6N2HvWorRXTKKCBambXtMnxh2ydmMz4WzQ76IY/t9w8L57VWjIxSYqtm8K+wVxI8Qo/6
	pf/hFvCCYiNtrzsUJoS5LGebTwj8IgwXHncK5+HTbDWXG7VYkjhMYPE3h1Ll6ZPi0FEc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
Message-Id: <E1x4fFA-00H3BV-0A@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:55:12 +0000

commit e2ca9c64ca805417ec89fed828d15a6782c732f7
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Thu Sep 10 12:39:00 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:00 2026 +0200

    xen/sched: core: kill unarmed timers on sched_init_vcpu() failure
    
    sched_init_vcpu() calls init_timer() for a vcpu's periodic_timer,
    singleshot_timer and poll_timer before it can fail -- these
    become live, linked into their target pCPU's per-cpu timer list
    regardless of what happens next. If the sched_alloc_udata() call
    further down then fails, the function frees the sched_unit via
    sched_free_unit() and returns 1, but never unlinks these three
    timers.
    
    The caller, vcpu_create(), makes this worse: on sched_init_vcpu()
    returning nonzero it jumps to fail_wq, skipping fail_sched and
    thus sched_destroy_vcpu() -- the only function on this path that
    calls kill_timer() on them. vcpu_destroy() then frees the vcpu,
    and the three timers embedded in it, while they are still linked
    into that shared list.
    
    This silently corrupts that list. It only shows up later, when
    something else touches a neighboring timer: sched_move_domain()
    crashed with "Assertion 'entry->prev->next == entry' failed" on a
    completely unrelated, valid vcpu's timer.
    
    Call sched_destroy_vcpu() in sched_init_vcpu()'s own failure
    branch instead of sched_free_unit(), so it doesn't depend
    on the caller reaching sched_destroy_vcpu() to undo what it set
    up itself. sched_destroy_vcpu() assumes unit->priv is set, which
    is not the case here, so make it only free the udata and remove
    the unit if unit->priv in non-NULL.
    
    Fixes: d884b1077817 ("Domain creation/destruction cleanups.")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    master commit: 2565341135f88081535f6830a6256277e2834403
    master date: 2026-09-01 10:02:13 +0200
---
 xen/common/sched/core.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index e1fea666f4..8931312e8f 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -565,7 +565,7 @@ int sched_init_vcpu(struct vcpu *v)
     unit->priv = sched_alloc_udata(dom_scheduler(d), unit, d->sched_priv);
     if ( unit->priv == NULL )
     {
-        sched_free_unit(unit, v);
+        sched_destroy_vcpu(v);
         rcu_read_unlock(&sched_res_rculock);
         return 1;
     }
@@ -846,8 +846,11 @@ void sched_destroy_vcpu(struct vcpu *v)
     {
         rcu_read_lock(&sched_res_rculock);
 
-        sched_remove_unit(vcpu_scheduler(v), unit);
-        sched_free_udata(vcpu_scheduler(v), unit->priv);
+        if ( unit->priv )
+        {
+            sched_remove_unit(vcpu_scheduler(v), unit);
+            sched_free_udata(vcpu_scheduler(v), unit->priv);
+        }
         sched_free_unit(unit, v);
 
         rcu_read_unlock(&sched_res_rculock);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414755.1644488 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFL-0003Ik-R6; Thu, 10 Sep 2026 13:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414755.1644488; Thu, 10 Sep 2026 13:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFL-0003Ic-OQ; Thu, 10 Sep 2026 13:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1414755;
 Thu, 10 Sep 2026 13:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4fFK-0003IS-75
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFJ-0088Ue-2k
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFK-00H41z-0S
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nPyloP4XX8aklFl5pgHTr+aeULjUdTwaIrsz+NdwVOc=; b=bI4rk2gyOVzi6RUScTt3QENAAR
	WLS/3eRUPhCvE/iBeUUOa1idVzGE3oZuuNLxwOAxID1bnu84XliNOT3O+QfoyUx9DokfB/iyy9w8X
	eO1GVI21ALc6OSVtE1SVM756WKBVE2D+7r1yhhpCkJ+TpqTv+AvWSGomQ5m4NOYc2LKM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
Message-Id: <E1x4fFK-00H41z-0S@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:55:22 +0000

commit 3cf9223bbd34bff6560a9382bd4eb1598ee51983
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:39:18 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:18 2026 +0200

    x86/pci: Perform XSM checks on the correct device in pci_conf_write_intercept()
    
    The requested PCI segment needs including in the call to
    xsm_pci_config_permission().  Otherwise in a multi-segment system we can check
    the perimssions on one device but operate on a different one.
    
    This is only not a vulnerability because pci_conf_write_intercept() is only
    reachable by the hardware domain.
    
    Fixes: 300bb048ca31 ("x86/PCI: make all config space writes subject to XSM checking")
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: b4a671acf151dec87bc99bc2547e73149bd3c55e
    master date: 2026-09-03 09:45:16 +0100
---
 xen/arch/x86/pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c
index 26bb7f6a3c..0a9505b5a4 100644
--- a/xen/arch/x86/pci.c
+++ b/xen/arch/x86/pci.c
@@ -73,8 +73,9 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
                              unsigned int reg, unsigned int size,
                              uint32_t *data)
 {
+    pci_sbdf_t sbdf = PCI_SBDF(seg, bdf);
     struct pci_dev *pdev;
-    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, bdf,
+    int rc = xsm_pci_config_permission(XSM_HOOK, current->domain, sbdf.sbdf,
                                        reg, reg + size - 1, 1);
 
     if ( rc < 0 )
@@ -90,7 +91,7 @@ int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
 
     pcidevs_lock();
 
-    pdev = pci_get_pdev(NULL, PCI_SBDF(seg, bdf));
+    pdev = pci_get_pdev(NULL, sbdf);
     if ( pdev )
         rc = pci_msi_conf_write_intercept(pdev, reg, size, data);
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414756.1644492 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFV-0003Ks-SS; Thu, 10 Sep 2026 13:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414756.1644492; Thu, 10 Sep 2026 13:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFV-0003Kj-Pp; Thu, 10 Sep 2026 13:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1414756;
 Thu, 10 Sep 2026 13:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4fFU-0003Kb-9u
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFT-0088Uk-33
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFU-00H58j-0j
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Gh2NJyZ/1LMyMoNU8Kl45RwV5f2u2URFxLQe5LbDFx0=; b=tD0WzzZEyAJs5/mHz5HIvkgy5B
	ZNL7fLQdjNPubbospEcSWRhe/N3xyTSbgV0+UViJ0KIgxCeJbpRKpH+Pf8VUqblzCdYbf8DAtgSas
	TGZWfz4EoLsbo2lmTbnQ2lVzSSuz+0daYSbHPqVrhePfeEYRDNO5KY1x9NQu6lst4zVQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] build: also exclude .data.rel.ro in $(cmd_obj_init_o)
Message-Id: <E1x4fFU-00H58j-0j@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:55:32 +0000

commit 754fda48d31a566136a0973e8af01f8990949c02
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:39:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:35 2026 +0200

    build: also exclude .data.rel.ro in $(cmd_obj_init_o)
    
    .data.rel.ro really is merely a special case of .rodata: r/o data, but
    with runtime relocations (not relevant to Xen), i.e. r/o only after
    relocations were performed (by the dynamic loader).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    master commit: f7eab298bb9f2634e555aea1db70efcbbfd4d316
    master date: 2026-09-08 09:50:48 +0200
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index d759cccee3..10dc4a9562 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -259,7 +259,7 @@ quiet_cmd_obj_init_o = INIT_O  $@
 define cmd_obj_init_o
     $(OBJDUMP) -h $< | while read idx name sz rest; do \
         case "$$name" in \
-        .*.local) ;; \
+        .*.local|.data.rel.ro|.data.rel.ro.*) ;; \
         .text|.text.*|.data|.data.*|.bss|.bss.*) \
             test $$(echo $$sz | sed 's,00*,0,') != 0 || continue; \
             echo "Error: size of $<:$$name is 0x$$sz" >&2; \
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:55:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:55:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414757.1644496 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFf-0003Mq-Ti; Thu, 10 Sep 2026 13:55:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414757.1644496; Thu, 10 Sep 2026 13:55:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFf-0003Mi-RA; Thu, 10 Sep 2026 13:55:43 +0000
Received: by outflank-mailman (input) for mailman id 1414757;
 Thu, 10 Sep 2026 13:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4fFe-0003Ma-DG
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFe-0088Ur-09
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFe-00H5zf-13
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nG2Ooh6T3kwLn7oMDxn7LdIgaFK+vHQv6YeFYleDfnI=; b=4GViWJFgadfcIPw2OmDoc0sQvt
	F2raoN2eaISC75kcL8kBwOD0GL3AycJBhiJdxxLV5JJpstBOMH/YFaEbPbMr24KGJgMeN3lvhZLSj
	syw0wf4s7nK+YHV4VnDDqPh0YzcqFc1Onr3pAoMrkhAHJ1XjqCiEF5V5p8TlB7eFfhe8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] EFI: don't use alias attribute for compat hypercall stubs
Message-Id: <E1x4fFe-00H5zf-13@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:55:42 +0000

commit 568e954b5af46b0750a92128b5d45d42e1eecb1f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Sep 10 12:39:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:39:45 2026 +0200

    EFI: don't use alias attribute for compat hypercall stubs
    
    Recent Clang objects to types differing between alias and aliasee. Accept
    the unnecessary overhead and make the two compat stubs real functions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    master commit: 5df9425a733ea42613d2f414ec88d2c770ea4c20
    master date: 2026-09-09 14:15:15 +0200
---
 xen/common/efi/common-stub.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 7b12005bea..cbb46df3df 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -28,10 +28,14 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
 #ifdef CONFIG_COMPAT
 
-int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
-    __attribute__((__alias__("efi_get_info")));
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *info)
+{
+    return -ENOSYS;
+}
 
-int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
-    __attribute__((__alias__("efi_runtime_call")));
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *op)
+{
+    return -ENOSYS;
+}
 
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Thu Sep 10 13:55:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 10 Sep 2026 13:55:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1414758.1644500 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFp-0003P3-V4; Thu, 10 Sep 2026 13:55:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1414758.1644500; Thu, 10 Sep 2026 13:55:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4fFp-0003Ov-SU; Thu, 10 Sep 2026 13:55:53 +0000
Received: by outflank-mailman (input) for mailman id 1414758;
 Thu, 10 Sep 2026 13:55:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4fFo-0003Op-Fa
 for xen-changelog@lists.xenproject.org; Thu, 10 Sep 2026 13:55:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFo-0088Uv-0Q
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4fFo-00H6qT-1M
 for xen-changelog@lists.xenproject.org;
 Thu, 10 Sep 2026 13:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=o2TDyfn4VN1CYjclRZfTGMtQAnB0U8XKEUu8p/x2cnI=; b=AVvPYmU/myIGyT0RNnX1yiKl4u
	9E77y+a87XgDU8tx5+eVN8EASh3yKJe2Bac8nS1o7FrPMtV+57aCVNdB9q51bfpl8DHHaot6Ya92p
	yk5AuFviogO+Om8B7rIdavCu6UDN3IeVa1MO5IrFuZAsQT0xABan2H6HZVDaAxiYG9nU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] x86/ucode: Work around Granite Rapids erraturm GNR98
Message-Id: <E1x4fFo-00H6qT-1M@xenbits.xenproject.org>
Date: Thu, 10 Sep 2026 13:55:52 +0000

commit afd8175444ed7be2a3c1ab5f6ad542d082414ddc
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Sep 10 12:40:03 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Sep 10 12:40:03 2026 +0200

    x86/ucode: Work around Granite Rapids erraturm GNR98
    
    Block loads which are known to hang the system.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Roger Pau Monné <roger@xenproject.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    master commit: 70cbd9a08d6542185fabb14f91c61b63ec4cb2ec
    master date: 2026-09-09 18:07:32 +0100
---
 xen/arch/x86/cpu/microcode/intel.c | 42 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/xen/arch/x86/cpu/microcode/intel.c b/xen/arch/x86/cpu/microcode/intel.c
index 3f8e9ca63b..368bbb18cc 100644
--- a/xen/arch/x86/cpu/microcode/intel.c
+++ b/xen/arch/x86/cpu/microcode/intel.c
@@ -24,6 +24,7 @@
 #include <xen/err.h>
 #include <xen/init.h>
 
+#include <asm/intel-family.h>
 #include <asm/msr.h>
 #include <asm/system.h>
 
@@ -269,6 +270,46 @@ static bool microcode_fits_cpu(const struct microcode_patch *mc)
     return false;
 }
 
+static bool microcode_safe_to_load(const struct microcode_patch *mc)
+{
+    const struct cpu_signature *cpu_sig = &this_cpu(cpu_sig);
+
+    /*
+     * Treat pre-production as always safe - anyone using pre-production
+     * microcode knows what they are doing, and can keep any resulting pieces.
+     */
+    if ( (int)cpu_sig->rev < 0 || mc->rev < 0 )
+        return true;
+
+    /*
+     * GNR98 states that Granite Rapids systems hang when loading new ucode on
+     * sufficiently old firmware.  GNR101 retroactively states that one ucode
+     * had an incorrect minimum revision field, in light of discovering GNR98.
+     *
+     * Both are incomplete statements of the problem.
+     *
+     * At the time of writing (August 2026), the believed safe sequence is:
+     *   previous -> [0x01000380...0x010003f3] -> 0x01000405 -> any later
+     *
+     * Disallow known-unsafe loads while permitting believed-safe loads.  For
+     * GNR, this allows multi-hop loading to get up to the latest.
+     */
+    if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
+         boot_cpu_data.x86 == 6 &&
+         boot_cpu_data.x86_model == INTEL_FAM6_GRANITERAPIDS_X &&
+         boot_cpu_data.x86_mask == 1 && (cpu_sig->pf & 0x95) &&
+         ((cpu_sig->rev < 0x01000380 && mc->rev >= 0x01000405) ||
+          (cpu_sig->rev < 0x01000405 && mc->rev >  0x01000405)) )
+    {
+        printk_once(XENLOG_WARNING "microcode: Granite Rapids erratum GNR98 detected.  Skipping ucode 0x%08x\n"
+                    XENLOG_WARNING "microcode: Firmware update recommended\n",
+                    mc->rev);
+        return false;
+    }
+
+    return true;
+}
+
 static int cf_check intel_compare(
     const struct microcode_patch *old, const struct microcode_patch *new)
 {
@@ -361,6 +402,7 @@ static struct microcode_patch *cf_check cpu_request_microcode(
          * one with higher revision.
          */
         if ( microcode_fits_cpu(mc) &&
+             microcode_safe_to_load(mc) &&
              (!saved || compare_revisions(saved->rev, mc->rev) == NEW_UCODE) )
             saved = mc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 08:11:11 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 08:11:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1415936.1645121 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wLg-0002UB-Kj; Fri, 11 Sep 2026 08:11:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1415936.1645121; Fri, 11 Sep 2026 08:11:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wLg-0002U2-Ho; Fri, 11 Sep 2026 08:11:04 +0000
Received: by outflank-mailman (input) for mailman id 1415936;
 Fri, 11 Sep 2026 08:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4wLe-0002Tv-To
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 08:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wLd-009gpV-38
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wLe-00BhG3-0l
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eXApDvQ7BDvE6bWWqy4ug9JqmaE9R9pqO0PZVSfg2B4=; b=IanIYdf1SEdl6weaVx/g7YaWFE
	op54veKqHraOD7njdQGduAiELTKYqEOmUzKo9H4FYmX6NgRUta2dyply0ZhVC6C87o5nQXW3WcIsV
	/iEKy9V9cDNU+ybD19B7fkxVRE8WGJA+HDkesqd2+/leVO46dIqS+7ECZyMEWxgwC7X0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/mm: pagetable_dying() is HVM+SHADOW_PAGING only
Message-Id: <E1x4wLe-00BhG3-0l@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 08:11:02 +0000

commit 4fcd42a9583f4bad4baa66a28b82dd5ea80947c6
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:52:40 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:52:40 2026 +0200

    x86/mm: pagetable_dying() is HVM+SHADOW_PAGING only
    
    The referenced commit didn't go far enough, leaving a Misra rule 2.1
    (unreachable code) violation: The function lacks "noreturn" in this
    configuration. Since with SHADOW_PAGING=n paging_mode_shadow() is compile-
    time-constant false, the compiler can DCE the call site. Hence we can
    avoid building the function itself altogether.
    
    No functional change.
    
    Fixes: 2fb2dee1ac62 ("x86/mm: pagetable_dying() is HVM-only")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/paging.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 14ab7defd8..4bb8d169de 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -872,22 +872,18 @@ int paging_enable(struct domain *d, u32 mode)
 }
 #endif
 
-#ifdef CONFIG_HVM
+#if defined(CONFIG_HVM) && defined(CONFIG_SHADOW_PAGING)
 /* Called from the guest to indicate that a process is being torn down
  * and therefore its pagetables will soon be discarded */
 void pagetable_dying(paddr_t gpa)
 {
-#ifdef CONFIG_SHADOW_PAGING
     struct vcpu *curr = current;
 
     ASSERT(paging_mode_shadow(curr->domain));
 
     curr->arch.paging.mode->shadow.pagetable_dying(gpa);
-#else
-    BUG();
-#endif
 }
-#endif /* CONFIG_HVM */
+#endif /* HVM && SHADOW_PAGING */
 
 /* Print paging-assistance info to the console */
 void paging_dump_domain_info(struct domain *d)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 08:11:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 08:11:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1415937.1645126 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wLo-0002WG-NJ; Fri, 11 Sep 2026 08:11:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1415937.1645126; Fri, 11 Sep 2026 08:11:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wLo-0002W6-Ke; Fri, 11 Sep 2026 08:11:12 +0000
Received: by outflank-mailman (input) for mailman id 1415937;
 Fri, 11 Sep 2026 08:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4wLo-0002W0-Db
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 08:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wLo-009gpt-0D
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wLo-00Bi0M-19
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=o/8B+T+Tb4p/A5eqrGWwV75YbA6F3CjmCBZF2+X8kEw=; b=GlQ6zbJMLfb8lhPRG8qLO0Yr1w
	pP+idmV4t0zFQzfx9gWlpiy1df5ALjsttyiDfxte4tuq8jUgOqKKBObzTUnAmpTvDFR7jX9qtJndm
	ZFQg+HgrweRvuhU4lLPGQlbrvbr2EeY5VKkbYrSmf6bjuE0sKw19EQaZzJqNq7xI4Vt0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/shadow: eliminate unused forms of sh_map_and_validate_gl<N>e()
Message-Id: <E1x4wLo-00Bi0M-19@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 08:11:12 +0000

commit 7fc89f964963e4e008e5851c9460a2aecf8750e9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:53:19 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:53:19 2026 +0200

    x86/shadow: eliminate unused forms of sh_map_and_validate_gl<N>e()
    
    The L2H, L3, and L4 forms only have GUEST_PAGING_LEVELS=4 call sites, i.e.
    their 2- and 3-level forms are unreachable, violating Misra rule 2.1. The
    L2H form additionally is unused (call site DCE-d) with PV32=n.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/shadow/multi.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 1ae1091acd..7f72b4b7b2 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -1789,35 +1789,30 @@ sh_map_and_validate(struct vcpu *v, mfn_t gmfn,
     return result;
 }
 
+#if GUEST_PAGING_LEVELS >= 4
 
 int
 sh_map_and_validate_gl4e(struct vcpu *v, mfn_t gl4mfn,
                           void *new_gl4p, u32 size)
 {
-#if GUEST_PAGING_LEVELS >= 4
     return sh_map_and_validate(v, gl4mfn, new_gl4p, size,
                                 SH_type_l4_shadow,
                                 shadow_l4_index,
                                 validate_gl4e);
-#else // ! GUEST_PAGING_LEVELS >= 4
-    BUG(); /* Called in wrong paging mode! */
-#endif
 }
 
 int
 sh_map_and_validate_gl3e(struct vcpu *v, mfn_t gl3mfn,
                           void *new_gl3p, u32 size)
 {
-#if GUEST_PAGING_LEVELS >= 4
     return sh_map_and_validate(v, gl3mfn, new_gl3p, size,
                                 SH_type_l3_shadow,
                                 shadow_l3_index,
                                 validate_gl3e);
-#else // ! GUEST_PAGING_LEVELS >= 4
-    BUG(); /* Called in wrong paging mode! */
-#endif
 }
 
+#endif /* GUEST_PAGING_LEVELS >= 4 */
+
 int
 sh_map_and_validate_gl2e(struct vcpu *v, mfn_t gl2mfn,
                           void *new_gl2p, u32 size)
@@ -1828,19 +1823,17 @@ sh_map_and_validate_gl2e(struct vcpu *v, mfn_t gl2mfn,
                                 validate_gl2e);
 }
 
+#if defined(CONFIG_PV32) && GUEST_PAGING_LEVELS >= 4
 int
 sh_map_and_validate_gl2he(struct vcpu *v, mfn_t gl2mfn,
                            void *new_gl2p, u32 size)
 {
-#if GUEST_PAGING_LEVELS >= 4 && defined(CONFIG_PV32)
     return sh_map_and_validate(v, gl2mfn, new_gl2p, size,
                                 SH_type_l2h_shadow,
                                 shadow_l2_index,
                                 validate_gl2e);
-#else /* Non-PAE guests don't have different kinds of l2 table */
-    BUG(); /* Called in wrong paging mode! */
-#endif
 }
+#endif /* CONFIG_PV32 && GUEST_PAGING_LEVELS >= 4 */
 
 int
 sh_map_and_validate_gl1e(struct vcpu *v, mfn_t gl1mfn,
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 08:11:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 08:11:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1415938.1645130 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wLz-0002YK-Oh; Fri, 11 Sep 2026 08:11:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1415938.1645130; Fri, 11 Sep 2026 08:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wLz-0002YC-M2; Fri, 11 Sep 2026 08:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1415938;
 Fri, 11 Sep 2026 08:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4wLy-0002Y4-Gv
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 08:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wLy-009gpx-0X
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wLy-00Bita-1S
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=yLClwUsexoK961TJ619kYm1iSxRmpRy6J03t2InuGbg=; b=cYXxgvXf28zWD6+UBdPTJtH0HQ
	pW6+PcTEZI7et6/ypyXEtsf67JrIhT/cG8ZXOTz2xNwXhd5uOscKwR9XFqcW5KEARqUognRnU4JSu
	Oytpa9S5ks8FeEsqmyB5xA5WK0v1rXFMEM9i+O5sfDGCKgFNJ8gEzR8Su02f5nVPmqqs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/HVM: address Misra 2.1 rule violations
Message-Id: <E1x4wLy-00Bita-1S@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 08:11:22 +0000

commit bc24cc6b723627ec3e136ad38770c119e45f70df
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:53:58 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:53:58 2026 +0200

    x86/HVM: address Misra 2.1 rule violations
    
    In hvm_set_cr3() the "bad_cr3" label is reachable only with
    SHADOW_PAGING=y; the code being there is therefore a Misra rule 2.1
    (unreachable code) violation when SHADOW_PAGING=n.
    
    Similarly code past the initial switch() in hvm_debug_op() is reachable
    only when CONFIG_INTEL_VMX=y.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/hvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 9a4147b62e..28f11a5292 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2455,6 +2455,7 @@ int hvm_set_cr3(unsigned long value, bool noflush, bool may_defer)
     return X86EMUL_OKAY;
 
  bad_cr3:
+    BUILD_ERROR_IF_NOT(CONFIG_SHADOW_PAGING);
     gdprintk(XENLOG_ERR, "Invalid CR3\n");
     domain_crash(currd);
     return X86EMUL_UNHANDLEABLE;
@@ -5201,6 +5202,8 @@ int hvm_debug_op(struct vcpu *v, int32_t op)
             return -ENOSYS;
     }
 
+    BUILD_ERROR_IF_NOT(CONFIG_INTEL_VMX);
+
     vcpu_pause(v);
 
     switch ( op )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 08:11:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 08:11:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1415939.1645134 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wM9-0002aJ-Pw; Fri, 11 Sep 2026 08:11:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1415939.1645134; Fri, 11 Sep 2026 08:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wM9-0002aB-NJ; Fri, 11 Sep 2026 08:11:33 +0000
Received: by outflank-mailman (input) for mailman id 1415939;
 Fri, 11 Sep 2026 08:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4wM8-0002a4-Jz
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 08:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wM8-009gq6-0r
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wM8-00BjeB-1m
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=or45ioZqwobhrtZNs4wQbnBaU9kP9h/lDDxIewqStjQ=; b=675uemHnvacjm+zVvLl/MzduC7
	tQQJIdPW0aL/Z8Ve9XzUDta7HChrz2UCWHGoKICW3TzkdMRozhqgqSIxO/vC7/CE1Njft4rMuUaPl
	OZXEMhmTT3KX/DgEecIhu6vo7gBynvzboQJN637DFf6jwesu8LJc5c09MBcL9eQs76OI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/nSVM: address Misra 2.1 rule violation
Message-Id: <E1x4wM8-00BjeB-1m@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 08:11:32 +0000

commit 0c8460766af84978f93c4076144ef4b259e578fb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:54:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:54:53 2026 +0200

    x86/nSVM: address Misra 2.1 rule violation
    
    The 16-bit range of "port" is fully handled by the switch(). Therefore the
    default: case is reported unreachable by Eclair. Insert BUILD_ERROR() to
    annotate this for Eclair.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 5adb1bd72c..eec61238b5 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -845,7 +845,7 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
         ++gfn;
         break;
     default:
-        BUG();
+        BUILD_ERROR("I/O port range not fully covered");
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 08:11:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 08:11:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1415940.1645138 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wMJ-0002cJ-RK; Fri, 11 Sep 2026 08:11:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1415940.1645138; Fri, 11 Sep 2026 08:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4wMJ-0002cB-Og; Fri, 11 Sep 2026 08:11:43 +0000
Received: by outflank-mailman (input) for mailman id 1415940;
 Fri, 11 Sep 2026 08:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4wMI-0002c2-N2
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 08:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wMI-009gqD-19
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4wMI-00BkMP-25
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 08:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=UUWL3hKfV7c5i8W1DVhnJiXMATq8AHYxm1niC1o8gyo=; b=Wf83M9KAojk22ZxbKip2BJqe0g
	SSgkghZchc4gGIHCBlAIa/5ZqmG89+Ruvf5O7Kb0zgfniF9awfxNIvQalMPfPoDnLNS5OP0dbICWe
	9SP8kEAJr5wQNbRVfHPQ+SnboE4yB6ILwLFYtQE3kCR+z4LuUAHcdNNuyyoB0uz98t40=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] sched/core: avoid use of "current" in initializer lists
Message-Id: <E1x4wMI-00BkMP-25@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 08:11:42 +0000

commit acd87f99ac65ff9426dd52f9b7a6ef9db45cc735
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:55:16 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:55:16 2026 +0200

    sched/core: avoid use of "current" in initializer lists
    
    TRACE_TIME() uses an initializer list and hence is covered by Misra C:2012
    rule 13.1 ("Initializer lists shall not contain persistent side effects").
    Use intermediate variables to address this.
    
    In vcpu_yield() take the opportunity to rename the existing variable which
    better would have been used already before.
    
    In do_sched_op() extend the scope of and rename an existing variable. Also
    drop a pointless (and slightly malformed, style-wise) cast there, and
    adjust to other one to by style conformant.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/core.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index c83bf7fea5..ee24cc28f6 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -1531,20 +1531,20 @@ static long do_poll(const struct sched_poll *sched_poll)
 /* Voluntarily yield the processor for this allocation. */
 long vcpu_yield(void)
 {
-    struct vcpu * v=current;
+    struct vcpu *curr = current;
     spinlock_t *lock;
 
     rcu_read_lock(&sched_res_rculock);
 
-    lock = unit_schedule_lock_irq(v->sched_unit);
-    sched_yield(vcpu_scheduler(v), v->sched_unit);
-    unit_schedule_unlock_irq(lock, v->sched_unit);
+    lock = unit_schedule_lock_irq(curr->sched_unit);
+    sched_yield(vcpu_scheduler(curr), curr->sched_unit);
+    unit_schedule_unlock_irq(lock, curr->sched_unit);
 
     rcu_read_unlock(&sched_res_rculock);
 
     SCHED_STAT_CRANK(vcpu_yield);
 
-    TRACE_TIME(TRC_SCHED_YIELD, current->domain->domain_id, current->vcpu_id);
+    TRACE_TIME(TRC_SCHED_YIELD, curr->domain->domain_id, curr->vcpu_id);
     raise_softirq(SCHEDULE_SOFTIRQ);
     return 0;
 }
@@ -1914,6 +1914,8 @@ typedef long ret_t;
 
 ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
+    const struct vcpu *curr = current;
+    struct domain *currd = curr->domain;
     ret_t ret = 0;
 
     switch ( cmd )
@@ -1938,9 +1940,9 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&sched_shutdown, arg, 1) )
             break;
 
-        TRACE_TIME(TRC_SCHED_SHUTDOWN, current->domain->domain_id,
-                   current->vcpu_id, sched_shutdown.reason);
-        ret = domain_shutdown(current->domain, (u8)sched_shutdown.reason);
+        TRACE_TIME(TRC_SCHED_SHUTDOWN, currd->domain_id, curr->vcpu_id,
+                   sched_shutdown.reason);
+        ret = domain_shutdown(currd, sched_shutdown.reason);
 
         break;
     }
@@ -1948,19 +1950,18 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case SCHEDOP_shutdown_code:
     {
         struct sched_shutdown sched_shutdown;
-        struct domain *d = current->domain;
 
         ret = -EFAULT;
         if ( copy_from_guest(&sched_shutdown, arg, 1) )
             break;
 
-        TRACE_TIME(TRC_SCHED_SHUTDOWN_CODE, d->domain_id, current->vcpu_id,
+        TRACE_TIME(TRC_SCHED_SHUTDOWN_CODE, currd->domain_id, curr->vcpu_id,
                    sched_shutdown.reason);
 
-        spin_lock(&d->shutdown_lock);
-        if ( d->shutdown_code == SHUTDOWN_CODE_INVALID )
-            d->shutdown_code = (u8)sched_shutdown.reason;
-        spin_unlock(&d->shutdown_lock);
+        spin_lock(&currd->shutdown_lock);
+        if ( currd->shutdown_code == SHUTDOWN_CODE_INVALID )
+            currd->shutdown_code = (uint8_t)sched_shutdown.reason;
+        spin_unlock(&currd->shutdown_lock);
 
         ret = 0;
         break;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 09:22:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 09:22:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1416106.1645259 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSM-0002jR-VJ; Fri, 11 Sep 2026 09:22:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1416106.1645259; Fri, 11 Sep 2026 09:22:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSM-0002jI-Sh; Fri, 11 Sep 2026 09:22:02 +0000
Received: by outflank-mailman (input) for mailman id 1416106;
 Fri, 11 Sep 2026 09:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4xSM-0002jB-LL
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 09:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSM-009iOK-02
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSM-00GvDt-0x
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=CMSc2WNw7XrloPhYgMa6D3LsFXy5YDcpdfhDsEoeH+c=; b=wCSQrXLAcrHUhnJIm7krgz3gwL
	QnnhRIrk4u94hrsw71Ef1Y+Xetc1xCslrP3/eOHKurwLesI+EV3A5BbMItu5ZTnrhRhxgzSWUWGFS
	ewJQ/ECPiLrVt1BHAx/sN8GkFJMqYvQxHjRmOJnZvrMXMq/N2K9dSLqNQlnMpriWamqo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/mm: pagetable_dying() is HVM+SHADOW_PAGING only
Message-Id: <E1x4xSM-00GvDt-0x@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 09:22:02 +0000

commit 4fcd42a9583f4bad4baa66a28b82dd5ea80947c6
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:52:40 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:52:40 2026 +0200

    x86/mm: pagetable_dying() is HVM+SHADOW_PAGING only
    
    The referenced commit didn't go far enough, leaving a Misra rule 2.1
    (unreachable code) violation: The function lacks "noreturn" in this
    configuration. Since with SHADOW_PAGING=n paging_mode_shadow() is compile-
    time-constant false, the compiler can DCE the call site. Hence we can
    avoid building the function itself altogether.
    
    No functional change.
    
    Fixes: 2fb2dee1ac62 ("x86/mm: pagetable_dying() is HVM-only")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/paging.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c
index 14ab7defd8..4bb8d169de 100644
--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -872,22 +872,18 @@ int paging_enable(struct domain *d, u32 mode)
 }
 #endif
 
-#ifdef CONFIG_HVM
+#if defined(CONFIG_HVM) && defined(CONFIG_SHADOW_PAGING)
 /* Called from the guest to indicate that a process is being torn down
  * and therefore its pagetables will soon be discarded */
 void pagetable_dying(paddr_t gpa)
 {
-#ifdef CONFIG_SHADOW_PAGING
     struct vcpu *curr = current;
 
     ASSERT(paging_mode_shadow(curr->domain));
 
     curr->arch.paging.mode->shadow.pagetable_dying(gpa);
-#else
-    BUG();
-#endif
 }
-#endif /* CONFIG_HVM */
+#endif /* HVM && SHADOW_PAGING */
 
 /* Print paging-assistance info to the console */
 void paging_dump_domain_info(struct domain *d)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 09:22:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 09:22:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1416107.1645263 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSX-0002lB-0M; Fri, 11 Sep 2026 09:22:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1416107.1645263; Fri, 11 Sep 2026 09:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSW-0002l3-U2; Fri, 11 Sep 2026 09:22:12 +0000
Received: by outflank-mailman (input) for mailman id 1416107;
 Fri, 11 Sep 2026 09:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4xSW-0002kv-FI
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 09:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSW-009iOg-0L
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSW-00GvwS-1H
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=M8Mc3YYN2Vr+WMrqwpICj/pCfmT+5Kyo9GvBm/U5laY=; b=uWFYyhSK9V5P/S7QaXYYkI+L6N
	P6Od8uepvqJZIIIxGH7punDZ3nglhp9JwT1RgmF0d1RpFZdf24fp1Uxj1nY6eBc8P8YJb6iax3eKO
	3rUkBnc8Lkcy8wu4gUIz43HjaFnXAwfbApG3SB47seQf0EXPRiQJ4SoX7h2xiTZytzKI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: eliminate unused forms of sh_map_and_validate_gl<N>e()
Message-Id: <E1x4xSW-00GvwS-1H@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 09:22:12 +0000

commit 7fc89f964963e4e008e5851c9460a2aecf8750e9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:53:19 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:53:19 2026 +0200

    x86/shadow: eliminate unused forms of sh_map_and_validate_gl<N>e()
    
    The L2H, L3, and L4 forms only have GUEST_PAGING_LEVELS=4 call sites, i.e.
    their 2- and 3-level forms are unreachable, violating Misra rule 2.1. The
    L2H form additionally is unused (call site DCE-d) with PV32=n.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/shadow/multi.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 1ae1091acd..7f72b4b7b2 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -1789,35 +1789,30 @@ sh_map_and_validate(struct vcpu *v, mfn_t gmfn,
     return result;
 }
 
+#if GUEST_PAGING_LEVELS >= 4
 
 int
 sh_map_and_validate_gl4e(struct vcpu *v, mfn_t gl4mfn,
                           void *new_gl4p, u32 size)
 {
-#if GUEST_PAGING_LEVELS >= 4
     return sh_map_and_validate(v, gl4mfn, new_gl4p, size,
                                 SH_type_l4_shadow,
                                 shadow_l4_index,
                                 validate_gl4e);
-#else // ! GUEST_PAGING_LEVELS >= 4
-    BUG(); /* Called in wrong paging mode! */
-#endif
 }
 
 int
 sh_map_and_validate_gl3e(struct vcpu *v, mfn_t gl3mfn,
                           void *new_gl3p, u32 size)
 {
-#if GUEST_PAGING_LEVELS >= 4
     return sh_map_and_validate(v, gl3mfn, new_gl3p, size,
                                 SH_type_l3_shadow,
                                 shadow_l3_index,
                                 validate_gl3e);
-#else // ! GUEST_PAGING_LEVELS >= 4
-    BUG(); /* Called in wrong paging mode! */
-#endif
 }
 
+#endif /* GUEST_PAGING_LEVELS >= 4 */
+
 int
 sh_map_and_validate_gl2e(struct vcpu *v, mfn_t gl2mfn,
                           void *new_gl2p, u32 size)
@@ -1828,19 +1823,17 @@ sh_map_and_validate_gl2e(struct vcpu *v, mfn_t gl2mfn,
                                 validate_gl2e);
 }
 
+#if defined(CONFIG_PV32) && GUEST_PAGING_LEVELS >= 4
 int
 sh_map_and_validate_gl2he(struct vcpu *v, mfn_t gl2mfn,
                            void *new_gl2p, u32 size)
 {
-#if GUEST_PAGING_LEVELS >= 4 && defined(CONFIG_PV32)
     return sh_map_and_validate(v, gl2mfn, new_gl2p, size,
                                 SH_type_l2h_shadow,
                                 shadow_l2_index,
                                 validate_gl2e);
-#else /* Non-PAE guests don't have different kinds of l2 table */
-    BUG(); /* Called in wrong paging mode! */
-#endif
 }
+#endif /* CONFIG_PV32 && GUEST_PAGING_LEVELS >= 4 */
 
 int
 sh_map_and_validate_gl1e(struct vcpu *v, mfn_t gl1mfn,
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 09:22:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 09:22:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1416108.1645267 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSh-0002n7-1r; Fri, 11 Sep 2026 09:22:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1416108.1645267; Fri, 11 Sep 2026 09:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSg-0002mz-VM; Fri, 11 Sep 2026 09:22:22 +0000
Received: by outflank-mailman (input) for mailman id 1416108;
 Fri, 11 Sep 2026 09:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4xSg-0002mt-Hx
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 09:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSg-009iOk-0e
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSg-00GwfI-1a
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=AHmHLa6pcrEZUWe1NXqzxRHuaAN3kly7phW99ijOT8w=; b=a2nNWflojgUBCsuKSGsOY6GGaw
	vUVfpyxIz0++C4wTkWCJ4S9LDzdjYfssfuJJaDpILFDMSIe+5MDXmjUXAgBANpq/j7yziBqpTB6TW
	Ut80l8DWxWmoR3YDqC4Cfz2CBYU6TF5DydiMEq0zVGszeKSi0UtBEO+ga/6IEUh0C9uI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/HVM: address Misra 2.1 rule violations
Message-Id: <E1x4xSg-00GwfI-1a@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 09:22:22 +0000

commit bc24cc6b723627ec3e136ad38770c119e45f70df
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:53:58 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:53:58 2026 +0200

    x86/HVM: address Misra 2.1 rule violations
    
    In hvm_set_cr3() the "bad_cr3" label is reachable only with
    SHADOW_PAGING=y; the code being there is therefore a Misra rule 2.1
    (unreachable code) violation when SHADOW_PAGING=n.
    
    Similarly code past the initial switch() in hvm_debug_op() is reachable
    only when CONFIG_INTEL_VMX=y.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/hvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 9a4147b62e..28f11a5292 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2455,6 +2455,7 @@ int hvm_set_cr3(unsigned long value, bool noflush, bool may_defer)
     return X86EMUL_OKAY;
 
  bad_cr3:
+    BUILD_ERROR_IF_NOT(CONFIG_SHADOW_PAGING);
     gdprintk(XENLOG_ERR, "Invalid CR3\n");
     domain_crash(currd);
     return X86EMUL_UNHANDLEABLE;
@@ -5201,6 +5202,8 @@ int hvm_debug_op(struct vcpu *v, int32_t op)
             return -ENOSYS;
     }
 
+    BUILD_ERROR_IF_NOT(CONFIG_INTEL_VMX);
+
     vcpu_pause(v);
 
     switch ( op )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 09:22:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 09:22:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1416109.1645271 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSr-0002pd-4D; Fri, 11 Sep 2026 09:22:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1416109.1645271; Fri, 11 Sep 2026 09:22:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xSr-0002pV-1a; Fri, 11 Sep 2026 09:22:33 +0000
Received: by outflank-mailman (input) for mailman id 1416109;
 Fri, 11 Sep 2026 09:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4xSq-0002pP-Ks
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 09:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSq-009iOo-0w
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xSq-00GxKp-1s
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Y2I0avGPbdQW8PiBN4rPUgBiW6yKSPJokbnn61SyMsQ=; b=32Fwe9u89migKxThp04/gdY7Ab
	VmQub1dCs1pYtKSKS64e8dn7kYaLsNFbR/kb73JRZvp136TtYBQreTCs0hgilV+WuDzNiVAQ5Eg62
	zb+zsL6TP9VbGV+5/Pkt9fOqKrt6r+3UHE6uiM8n/Biy39Imh6m1tXo0A2D12sRpQDOA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/nSVM: address Misra 2.1 rule violation
Message-Id: <E1x4xSq-00GxKp-1s@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 09:22:32 +0000

commit 0c8460766af84978f93c4076144ef4b259e578fb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:54:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:54:53 2026 +0200

    x86/nSVM: address Misra 2.1 rule violation
    
    The 16-bit range of "port" is fully handled by the switch(). Therefore the
    default: case is reported unreachable by Eclair. Insert BUILD_ERROR() to
    annotate this for Eclair.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index 5adb1bd72c..eec61238b5 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -845,7 +845,7 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
         ++gfn;
         break;
     default:
-        BUG();
+        BUILD_ERROR("I/O port range not fully covered");
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 09:22:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 09:22:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1416110.1645277 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xT1-0002rc-6P; Fri, 11 Sep 2026 09:22:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1416110.1645277; Fri, 11 Sep 2026 09:22:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x4xT1-0002rU-2v; Fri, 11 Sep 2026 09:22:43 +0000
Received: by outflank-mailman (input) for mailman id 1416110;
 Fri, 11 Sep 2026 09:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x4xT0-0002rO-Om
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 09:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xT0-009iOu-1J
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x4xT0-00Gy2M-2A
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 09:22:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=r8EMIIONkwHct7hkU5c8Jw58vk/9NMBMRdcD0IIP1+E=; b=tf0NHs4UFtJkurVRGy8nph0ob1
	yz6f3Mv+IqQELNFhC6EBiJJqTMI8x779zQ6QsU7iS2NHrxNlxaxYpAuY4FhqbIcTHtFEBbedIwlri
	aB3FpUP+1VfRNk9kmmXobe158N1wmOJwCWaMK/oE3/Cx2T79aWsrpczM7CBbvwU5jJyQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] sched/core: avoid use of "current" in initializer lists
Message-Id: <E1x4xT0-00Gy2M-2A@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 09:22:42 +0000

commit acd87f99ac65ff9426dd52f9b7a6ef9db45cc735
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Sep 11 08:55:16 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Sep 11 08:55:16 2026 +0200

    sched/core: avoid use of "current" in initializer lists
    
    TRACE_TIME() uses an initializer list and hence is covered by Misra C:2012
    rule 13.1 ("Initializer lists shall not contain persistent side effects").
    Use intermediate variables to address this.
    
    In vcpu_yield() take the opportunity to rename the existing variable which
    better would have been used already before.
    
    In do_sched_op() extend the scope of and rename an existing variable. Also
    drop a pointless (and slightly malformed, style-wise) cast there, and
    adjust to other one to by style conformant.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/core.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index c83bf7fea5..ee24cc28f6 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -1531,20 +1531,20 @@ static long do_poll(const struct sched_poll *sched_poll)
 /* Voluntarily yield the processor for this allocation. */
 long vcpu_yield(void)
 {
-    struct vcpu * v=current;
+    struct vcpu *curr = current;
     spinlock_t *lock;
 
     rcu_read_lock(&sched_res_rculock);
 
-    lock = unit_schedule_lock_irq(v->sched_unit);
-    sched_yield(vcpu_scheduler(v), v->sched_unit);
-    unit_schedule_unlock_irq(lock, v->sched_unit);
+    lock = unit_schedule_lock_irq(curr->sched_unit);
+    sched_yield(vcpu_scheduler(curr), curr->sched_unit);
+    unit_schedule_unlock_irq(lock, curr->sched_unit);
 
     rcu_read_unlock(&sched_res_rculock);
 
     SCHED_STAT_CRANK(vcpu_yield);
 
-    TRACE_TIME(TRC_SCHED_YIELD, current->domain->domain_id, current->vcpu_id);
+    TRACE_TIME(TRC_SCHED_YIELD, curr->domain->domain_id, curr->vcpu_id);
     raise_softirq(SCHEDULE_SOFTIRQ);
     return 0;
 }
@@ -1914,6 +1914,8 @@ typedef long ret_t;
 
 ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
+    const struct vcpu *curr = current;
+    struct domain *currd = curr->domain;
     ret_t ret = 0;
 
     switch ( cmd )
@@ -1938,9 +1940,9 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( copy_from_guest(&sched_shutdown, arg, 1) )
             break;
 
-        TRACE_TIME(TRC_SCHED_SHUTDOWN, current->domain->domain_id,
-                   current->vcpu_id, sched_shutdown.reason);
-        ret = domain_shutdown(current->domain, (u8)sched_shutdown.reason);
+        TRACE_TIME(TRC_SCHED_SHUTDOWN, currd->domain_id, curr->vcpu_id,
+                   sched_shutdown.reason);
+        ret = domain_shutdown(currd, sched_shutdown.reason);
 
         break;
     }
@@ -1948,19 +1950,18 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case SCHEDOP_shutdown_code:
     {
         struct sched_shutdown sched_shutdown;
-        struct domain *d = current->domain;
 
         ret = -EFAULT;
         if ( copy_from_guest(&sched_shutdown, arg, 1) )
             break;
 
-        TRACE_TIME(TRC_SCHED_SHUTDOWN_CODE, d->domain_id, current->vcpu_id,
+        TRACE_TIME(TRC_SCHED_SHUTDOWN_CODE, currd->domain_id, curr->vcpu_id,
                    sched_shutdown.reason);
 
-        spin_lock(&d->shutdown_lock);
-        if ( d->shutdown_code == SHUTDOWN_CODE_INVALID )
-            d->shutdown_code = (u8)sched_shutdown.reason;
-        spin_unlock(&d->shutdown_lock);
+        spin_lock(&currd->shutdown_lock);
+        if ( currd->shutdown_code == SHUTDOWN_CODE_INVALID )
+            currd->shutdown_code = (uint8_t)sched_shutdown.reason;
+        spin_unlock(&currd->shutdown_lock);
 
         ret = 0;
         break;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 17:33:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 17:33:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1417698.1646368 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x557X-0008UU-8V; Fri, 11 Sep 2026 17:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1417698.1646368; Fri, 11 Sep 2026 17:33:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x557X-0008UM-5z; Fri, 11 Sep 2026 17:33:03 +0000
Received: by outflank-mailman (input) for mailman id 1417698;
 Fri, 11 Sep 2026 17:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x557W-0008UF-OU
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 17:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x557W-009sKY-0m
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 17:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x557W-00DX8y-1h
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 17:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zTvJRGQMzl0Sa1vG031t369++YNPFRgn+vI5XjxvxkY=; b=jggUOy5hn4OEGtd7UeYP9KOXjx
	Oz3u03n9kAV4/paW0d6ftiBkfy7Z+lzjI7OF5v0p70b5LCK0J0j0X5lvq9LJmfPgHklXwxT+IhXW2
	TSv29fK7uVHx2RLuNDsVl8pU2RlZBOQ/KggGR7VS31+TUtwj2Tb2JJkKCgkSys1HqJcM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86: Rename X86_ET_EXT_INTR to X86_ET_INTR and fix function names
Message-Id: <E1x557W-00DX8y-1h@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 17:33:02 +0000

commit 73df85da4f7cf039568b41b70575e82b74106906
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Sep 11 11:20:16 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 11 18:24:25 2026 +0100

    x86: Rename X86_ET_EXT_INTR to X86_ET_INTR and fix function names
    
    The name X86_ET_EXT_INTR came from the VT-x code originally, but it's not
    really correct.
    
    The SDM doesn't give a concrete name, and only describes the fields as
    "external interrupts".  The APM does give a concrete name of INTR, and both
    Intel and AMD use the name INTR for related purposes elsewhere; the name
    derives originally from #INTR which was a real pin on early processors.
    
    Very importantly, this is distinct from ExtINT which is a type of maskable
    interrupt which can be sent in an x86 system.
    
    Therefore rename all {svm,vmx}_*_extint() to {svm,vmx}_*_intr(), as they
    pertain to all maskable interrupts, not only to ExtINT interrupts.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c                 |  2 +-
 xen/arch/x86/hvm/svm/intr.c            |  6 +++---
 xen/arch/x86/hvm/svm/svm.c             |  2 +-
 xen/arch/x86/hvm/vmx/intr.c            |  6 +++---
 xen/arch/x86/hvm/vmx/vmx.c             | 10 +++++-----
 xen/arch/x86/hvm/vmx/vvmx.c            |  2 +-
 xen/arch/x86/include/asm/hvm/vmx/vmx.h |  2 +-
 xen/arch/x86/include/asm/x86-defns.h   |  2 +-
 xen/arch/x86/traps.c                   |  6 +++---
 xen/arch/x86/x86_emulate/x86_emulate.c |  2 +-
 10 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 28f11a5292..192309c2fc 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -230,7 +230,7 @@ int hvm_event_needs_reinjection(uint8_t type, uint8_t vector)
 {
     switch ( type )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
     case X86_ET_NMI:
         return 1;
     case X86_ET_HW_EXC:
diff --git a/xen/arch/x86/hvm/svm/intr.c b/xen/arch/x86/hvm/svm/intr.c
index cf0621d2f6..4b0debfa9a 100644
--- a/xen/arch/x86/hvm/svm/intr.c
+++ b/xen/arch/x86/hvm/svm/intr.c
@@ -55,14 +55,14 @@ static void svm_inject_nmi(struct vcpu *v)
         vmcb, general1_intercepts | GENERAL1_INTERCEPT_IRET);
 }
 
-static void svm_inject_extint(struct vcpu *v, int vector)
+static void svm_inject_intr(struct vcpu *v, int vector)
 {
     struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb;
     intinfo_t event;
 
     event.raw = 0;
     event.v = true;
-    event.type = X86_ET_EXT_INTR;
+    event.type = X86_ET_INTR;
     event.vector = vector;
 
     ASSERT(!vmcb->event_inj.v);
@@ -225,7 +225,7 @@ void asmlinkage svm_intr_assist(void)
     else
     {
         TRACE(TRC_HVM_INJ_VIRQ, intack.vector, /*fake=*/ 0);
-        svm_inject_extint(v, intack.vector);
+        svm_inject_intr(v, intack.vector);
         pt_intr_post(v, intack);
     }
 
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 5f5d903d87..b5fc459e62 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -2808,7 +2808,7 @@ void asmlinkage svm_vmexit_handler(void)
                      vmcb->exit_int_info.vector == X86_EXC_OF )
                     break;
                 /* Fallthrough */
-            case X86_ET_EXT_INTR:
+            case X86_ET_INTR:
             case X86_ET_NMI:
                 insn_len = 0;
                 break;
diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index a8ced95871..6c220c4c2e 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -182,7 +182,7 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
         if ( intack.source == hvm_intsrc_pic ||
                  intack.source == hvm_intsrc_lapic )
         {
-            vmx_inject_extint(intack.vector, intack.source);
+            vmx_inject_intr(intack.vector, intack.source);
 
             ctrl = get_vvmcs(v, VM_EXIT_CONTROLS);
             if ( ctrl & VM_EXIT_ACK_INTR_ON_EXIT )
@@ -202,7 +202,7 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
         }
         else if ( intack.source == hvm_intsrc_vector )
         {
-            vmx_inject_extint(intack.vector, intack.source);
+            vmx_inject_intr(intack.vector, intack.source);
             return 1;
         }
     }
@@ -389,7 +389,7 @@ void asmlinkage vmx_intr_assist(void)
     else
     {
         TRACE(TRC_HVM_INJ_VIRQ, intack.vector, /*fake=*/ 0);
-        vmx_inject_extint(intack.vector, intack.source);
+        vmx_inject_intr(intack.vector, intack.source);
         pt_intr_post(v, intack);
     }
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index e55c90ce7f..7fa404878a 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2022,7 +2022,7 @@ static void __vmx_inject_exception(int trap, int type, int error_code)
         curr->arch.hvm.vmx.vmx_emulate = 1;
 }
 
-void vmx_inject_extint(int trap, uint8_t source)
+void vmx_inject_intr(int trap, uint8_t source)
 {
     struct vcpu *v = current;
     u32    pin_based_cntrl;
@@ -2032,13 +2032,13 @@ void vmx_inject_extint(int trap, uint8_t source)
         if ( pin_based_cntrl & PIN_BASED_EXT_INTR_MASK ) {
             nvmx_enqueue_n2_exceptions (v, 
                INTR_INFO_VALID_MASK |
-               MASK_INSR(X86_ET_EXT_INTR, INTR_INFO_INTR_TYPE_MASK) |
+               MASK_INSR(X86_ET_INTR, INTR_INFO_INTR_TYPE_MASK) |
                MASK_INSR(trap, INTR_INFO_VECTOR_MASK),
                X86_EVENT_NO_EC, source);
             return;
         }
     }
-    __vmx_inject_exception(trap, X86_ET_EXT_INTR, X86_EVENT_NO_EC);
+    __vmx_inject_exception(trap, X86_ET_INTR, X86_EVENT_NO_EC);
 }
 
 void vmx_inject_nmi(void)
@@ -3846,7 +3846,7 @@ gp_fault:
     return X86EMUL_EXCEPTION;
 }
 
-static void vmx_do_extint(struct cpu_user_regs *regs)
+static void vmx_do_intr(struct cpu_user_regs *regs)
 {
     unsigned long vector;
 
@@ -4219,7 +4219,7 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
     switch ( (uint16_t)exit_reason )
     {
     case EXIT_REASON_EXTERNAL_INTERRUPT:
-        vmx_do_extint(regs);
+        vmx_do_intr(regs);
         break;
     case EXIT_REASON_EXCEPTION_NMI:
         __vmread(VM_EXIT_INTR_INFO, &intr_info);
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index a5aa5eb163..e2407f07c2 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1346,7 +1346,7 @@ static void sync_exception_state(struct vcpu *v)
 
     switch ( MASK_EXTR(nvmx->intr.intr_info, INTR_INFO_INTR_TYPE_MASK) )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
         /* rename exit_reason to EXTERNAL_INTERRUPT */
         set_vvmcs(v, VM_EXIT_REASON, EXIT_REASON_EXTERNAL_INTERRUPT);
         set_vvmcs(v, EXIT_QUALIFICATION, 0);
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
index da04752e17..713d0900a9 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
@@ -484,7 +484,7 @@ static inline void vpid_sync_all(void)
 int cf_check vmx_guest_x86_mode(struct vcpu *v);
 unsigned int vmx_get_cpl(void);
 
-void vmx_inject_extint(int trap, uint8_t source);
+void vmx_inject_intr(int trap, uint8_t source);
 void vmx_inject_nmi(void);
 
 void ept_walk_table(struct domain *d, unsigned long gfn);
diff --git a/xen/arch/x86/include/asm/x86-defns.h b/xen/arch/x86/include/asm/x86-defns.h
index cce0f4d990..c210e9e6e1 100644
--- a/xen/arch/x86/include/asm/x86-defns.h
+++ b/xen/arch/x86/include/asm/x86-defns.h
@@ -221,7 +221,7 @@
  * These encodings were first used in VMCB/VMCS fields, but have become
  * architectural in the FRED spec.
  */
-#define X86_ET_EXT_INTR    0 /* External Interrupt */
+#define X86_ET_INTR        0 /* External Interrupt */
 #define X86_ET_NMI         2 /* NMI */
 #define X86_ET_HW_EXC      3 /* Hardware Exception (#PF/#GP/etc) */
 #define X86_ET_SW_INT      4 /* Software Interrupt (INT $n) */
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 1774966305..ac01ba0872 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1041,7 +1041,7 @@ void show_execution_state_nmi(const cpumask_t *mask, bool show_all)
 static const char *x86_et_name(unsigned int type)
 {
     static const char *const names[] = {
-        [X86_ET_EXT_INTR]    = "EXT_INTR",
+        [X86_ET_INTR]        = "INTR",
         [X86_ET_NMI]         = "NMI",
         [X86_ET_HW_EXC]      = "HW_EXC",
         [X86_ET_SW_INT]      = "SW_INT",
@@ -2295,7 +2295,7 @@ void asmlinkage entry_from_pv(struct cpu_user_regs *regs)
 
     switch ( type )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
         return do_IRQ(regs);
 
     case X86_ET_NMI:
@@ -2606,7 +2606,7 @@ void asmlinkage entry_from_xen(struct cpu_user_regs *regs)
 
     switch ( type )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
         return do_IRQ(regs);
 
     case X86_ET_NMI:
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 830ad90c9c..89c37fea2c 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -8691,7 +8691,7 @@ static void __init __maybe_unused build_assertions(void)
     BUILD_BUG_ON(x86_seg_gs != 5);
 
     /* Check X86_ET_* against VMCB EVENTINJ and VMCS INTR_INFO type fields. */
-    BUILD_BUG_ON(X86_ET_EXT_INTR    != 0);
+    BUILD_BUG_ON(X86_ET_INTR        != 0);
     BUILD_BUG_ON(X86_ET_NMI         != 2);
     BUILD_BUG_ON(X86_ET_HW_EXC      != 3);
     BUILD_BUG_ON(X86_ET_SW_INT      != 4);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 17:33:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 17:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1417699.1646372 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x557h-0008WO-A7; Fri, 11 Sep 2026 17:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1417699.1646372; Fri, 11 Sep 2026 17:33:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x557h-0008WG-75; Fri, 11 Sep 2026 17:33:13 +0000
Received: by outflank-mailman (input) for mailman id 1417699;
 Fri, 11 Sep 2026 17:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x557g-0008W9-MH
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 17:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x557g-009sKd-15
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 17:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x557g-00DY56-20
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 17:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ymYZW8dmw7uIYDnktL1MFKMCPUfMveEdRTSmj8vbR4A=; b=Jx4KmTznKcpz9KlulBcDfJX4dR
	J2Yr3TbeeY4WEXsp9LEAZzcXulTBfJcEb+5s7QHfYiLWjcprqt6z57vJPLsTBRotdvs3GhmgGVsyn
	jK/I6qoE90ebBmBtfofDeYv05zU1WeN1pJHEd0ZP/h4FqDRKzn/MWRc/+3odZtI1AstY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] nestedsvm: Fix multi-byte IO port intercept check
Message-Id: <E1x557g-00DY56-20@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 17:33:12 +0000

commit 221f87ad399d99d1dc580a8e3eff7b65f2695aec
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Fri Sep 11 14:23:15 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 11 18:24:25 2026 +0100

    nestedsvm: Fix multi-byte IO port intercept check
    
    For multi-byte IO port accesses, the APM says that SVM should intercept
    if any of the corresponding permission bits are set. However, the code
    has this backwards and only intercepts if all the permission bits are
    set. Fix this and at the same time, make things safer by handling
    mapping failures as intercepted. Also rename the 'enabled' variable to
    make it clearer what it does.
    
    This affects Hyper-V which for the root partition intercepts 0xcf8 and
    0xcfc-0xcff. L2 issues 4 byte CFG index writes to 0xcf8 which are incorrectly
    permitted and update the L1 CFG index. The subsequent L2 CFG data read at 0xcfc
    is intercepted by L1, then resubmitted as a CFG index write followed by CFG
    data read to L0. Since L1 doesn't see the CFG index write by L2, it uses the
    wrong index and gets garbage back, ultimately leading to a failure to boot
    since it cannot access its NVMe disk.
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index eec61238b5..a8b15d6eae 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -830,7 +830,7 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
     ioio_info_t ioinfo;
     uint16_t port;
     unsigned int size;
-    bool enabled;
+    bool intercepted;
 
     ioinfo.bytes = exitinfo1;
     port = ioinfo.fields.port;
@@ -851,8 +851,8 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
 
     for ( io_bitmap = hvm_map_guest_frame_ro(gfn, 0); ; )
     {
-        enabled = io_bitmap && test_bit(port, io_bitmap);
-        if ( !enabled || !--size )
+        intercepted = !io_bitmap || test_bit(port, io_bitmap);
+        if ( intercepted || !--size )
             break;
         if ( unlikely(++port == 8 * PAGE_SIZE) )
         {
@@ -863,7 +863,7 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
     }
     hvm_unmap_guest_frame(io_bitmap, 0);
 
-    if ( !enabled )
+    if ( !intercepted )
         return NESTEDHVM_VMEXIT_HOST;
 
     return NESTEDHVM_VMEXIT_INJECT;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 17:33:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 17:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1417700.1646376 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x557r-00006t-B2; Fri, 11 Sep 2026 17:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1417700.1646376; Fri, 11 Sep 2026 17:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x557r-00006l-8P; Fri, 11 Sep 2026 17:33:23 +0000
Received: by outflank-mailman (input) for mailman id 1417700;
 Fri, 11 Sep 2026 17:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x557q-00006f-Oz
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 17:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x557q-009sL6-1M
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 17:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x557q-00DZ4T-2J
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 17:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=S9uAor8t9hFsZh27iYtgkIcU2LKA97nzd5xhTrcgOz4=; b=vjd/lf+c9eEo/9jUbcJEmp9Xal
	pwXpqeapbqkcSELR0eJWNsbWAfOvnfm1Y3psHFrYgVp3mxalDPmzjoyKsG+w7wEFB/yjytPk5p4U4
	/CE7NYxG9+KRxZbv2jfHqHb60hm5qJDwJgs/oTmI3hxOUTjDSzU4dy34i82HV5gSbhys=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen: Use __has_include() in xen/percpu.h
Message-Id: <E1x557q-00DZ4T-2J@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 17:33:22 +0000

commit 6bdb8d45b749a4f376d0380ff9503162b14b8468
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 9 11:59:09 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 11 18:24:25 2026 +0100

    xen: Use __has_include() in xen/percpu.h
    
    Only x86 has an asm/percpu.h.  Have the compiler only include it if it's
    present, rather than symlinking an empty file.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/include/asm/Makefile   |  1 -
 xen/arch/ppc/include/asm/Makefile   |  1 -
 xen/arch/riscv/include/asm/Makefile |  1 -
 xen/include/asm-generic/percpu.h    | 14 --------------
 xen/include/xen/percpu.h            |  4 +++-
 5 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/Makefile
index 4565baca6a..a78a498eb5 100644
--- a/xen/arch/arm/include/asm/Makefile
+++ b/xen/arch/arm/include/asm/Makefile
@@ -5,7 +5,6 @@ generic-y += hardirq.h
 generic-y += iocap.h
 generic-y += irq-dt.h
 generic-y += paging.h
-generic-y += percpu.h
 generic-y += random.h
 generic-y += softirq.h
 generic-y += vm_event.h
diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile
index c989a7f89b..a5c46704cc 100644
--- a/xen/arch/ppc/include/asm/Makefile
+++ b/xen/arch/ppc/include/asm/Makefile
@@ -6,7 +6,6 @@ generic-y += hardirq.h
 generic-y += hypercall.h
 generic-y += iocap.h
 generic-y += paging.h
-generic-y += percpu.h
 generic-y += perfc_defn.h
 generic-y += random.h
 generic-y += softirq.h
diff --git a/xen/arch/riscv/include/asm/Makefile b/xen/arch/riscv/include/asm/Makefile
index 86c56251d5..d348369927 100644
--- a/xen/arch/riscv/include/asm/Makefile
+++ b/xen/arch/riscv/include/asm/Makefile
@@ -6,7 +6,6 @@ generic-y += hardirq.h
 generic-y += hypercall.h
 generic-y += iocap.h
 generic-y += irq-dt.h
-generic-y += percpu.h
 generic-y += random.h
 generic-y += softirq.h
 generic-y += vm_event.h
diff --git a/xen/include/asm-generic/percpu.h b/xen/include/asm-generic/percpu.h
deleted file mode 100644
index 3fdb3a2a02..0000000000
--- a/xen/include/asm-generic/percpu.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __ASM_GENERIC_PERCPU_H__
-#define __ASM_GENERIC_PERCPU_H__
-
-#endif /* __ASM_GENERIC_PERCPU_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/include/xen/percpu.h b/xen/include/xen/percpu.h
index 30609f49f0..d324671b5b 100644
--- a/xen/include/xen/percpu.h
+++ b/xen/include/xen/percpu.h
@@ -27,7 +27,9 @@
 
 #define get_per_cpu_var(var)  (per_cpu__##var)
 
-#include <asm/percpu.h>
+#if __has_include(<asm/percpu.h>)
+# include <asm/percpu.h>
+#endif
 
 #ifndef __ASSEMBLER__
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 18:44:11 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 18:44:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1417759.1646380 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x56EF-0002DE-1x; Fri, 11 Sep 2026 18:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1417759.1646380; Fri, 11 Sep 2026 18:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x56EE-0002D6-VA; Fri, 11 Sep 2026 18:44:02 +0000
Received: by outflank-mailman (input) for mailman id 1417759;
 Fri, 11 Sep 2026 18:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x56EE-0002Cv-K5
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 18:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x56ED-009ti5-2Y
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 18:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x56EE-000pbF-0F
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 18:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MOv9hUfvMnFhxaTanVVj9CoH8S7kgJHdFuHa18eu4ek=; b=WLuc5YPmmGRFADWoglZFHIOns2
	7mX8tdx2W1Agr1h7QiGbsK/RlgcRu/jowKNv5SMKeMTt5CB6BZp5cflJkpsR0HSTeliT3heA9iQhR
	k8a41rJQkeZJ5c8FHF7ybuucdaU8A2NVGhqu/I31E8bRCv/veWI0K5vnwa3UJ76lshP4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86: Rename X86_ET_EXT_INTR to X86_ET_INTR and fix function names
Message-Id: <E1x56EE-000pbF-0F@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 18:44:02 +0000

commit 73df85da4f7cf039568b41b70575e82b74106906
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Sep 11 11:20:16 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 11 18:24:25 2026 +0100

    x86: Rename X86_ET_EXT_INTR to X86_ET_INTR and fix function names
    
    The name X86_ET_EXT_INTR came from the VT-x code originally, but it's not
    really correct.
    
    The SDM doesn't give a concrete name, and only describes the fields as
    "external interrupts".  The APM does give a concrete name of INTR, and both
    Intel and AMD use the name INTR for related purposes elsewhere; the name
    derives originally from #INTR which was a real pin on early processors.
    
    Very importantly, this is distinct from ExtINT which is a type of maskable
    interrupt which can be sent in an x86 system.
    
    Therefore rename all {svm,vmx}_*_extint() to {svm,vmx}_*_intr(), as they
    pertain to all maskable interrupts, not only to ExtINT interrupts.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c                 |  2 +-
 xen/arch/x86/hvm/svm/intr.c            |  6 +++---
 xen/arch/x86/hvm/svm/svm.c             |  2 +-
 xen/arch/x86/hvm/vmx/intr.c            |  6 +++---
 xen/arch/x86/hvm/vmx/vmx.c             | 10 +++++-----
 xen/arch/x86/hvm/vmx/vvmx.c            |  2 +-
 xen/arch/x86/include/asm/hvm/vmx/vmx.h |  2 +-
 xen/arch/x86/include/asm/x86-defns.h   |  2 +-
 xen/arch/x86/traps.c                   |  6 +++---
 xen/arch/x86/x86_emulate/x86_emulate.c |  2 +-
 10 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 28f11a5292..192309c2fc 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -230,7 +230,7 @@ int hvm_event_needs_reinjection(uint8_t type, uint8_t vector)
 {
     switch ( type )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
     case X86_ET_NMI:
         return 1;
     case X86_ET_HW_EXC:
diff --git a/xen/arch/x86/hvm/svm/intr.c b/xen/arch/x86/hvm/svm/intr.c
index cf0621d2f6..4b0debfa9a 100644
--- a/xen/arch/x86/hvm/svm/intr.c
+++ b/xen/arch/x86/hvm/svm/intr.c
@@ -55,14 +55,14 @@ static void svm_inject_nmi(struct vcpu *v)
         vmcb, general1_intercepts | GENERAL1_INTERCEPT_IRET);
 }
 
-static void svm_inject_extint(struct vcpu *v, int vector)
+static void svm_inject_intr(struct vcpu *v, int vector)
 {
     struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb;
     intinfo_t event;
 
     event.raw = 0;
     event.v = true;
-    event.type = X86_ET_EXT_INTR;
+    event.type = X86_ET_INTR;
     event.vector = vector;
 
     ASSERT(!vmcb->event_inj.v);
@@ -225,7 +225,7 @@ void asmlinkage svm_intr_assist(void)
     else
     {
         TRACE(TRC_HVM_INJ_VIRQ, intack.vector, /*fake=*/ 0);
-        svm_inject_extint(v, intack.vector);
+        svm_inject_intr(v, intack.vector);
         pt_intr_post(v, intack);
     }
 
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 5f5d903d87..b5fc459e62 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -2808,7 +2808,7 @@ void asmlinkage svm_vmexit_handler(void)
                      vmcb->exit_int_info.vector == X86_EXC_OF )
                     break;
                 /* Fallthrough */
-            case X86_ET_EXT_INTR:
+            case X86_ET_INTR:
             case X86_ET_NMI:
                 insn_len = 0;
                 break;
diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index a8ced95871..6c220c4c2e 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -182,7 +182,7 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
         if ( intack.source == hvm_intsrc_pic ||
                  intack.source == hvm_intsrc_lapic )
         {
-            vmx_inject_extint(intack.vector, intack.source);
+            vmx_inject_intr(intack.vector, intack.source);
 
             ctrl = get_vvmcs(v, VM_EXIT_CONTROLS);
             if ( ctrl & VM_EXIT_ACK_INTR_ON_EXIT )
@@ -202,7 +202,7 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
         }
         else if ( intack.source == hvm_intsrc_vector )
         {
-            vmx_inject_extint(intack.vector, intack.source);
+            vmx_inject_intr(intack.vector, intack.source);
             return 1;
         }
     }
@@ -389,7 +389,7 @@ void asmlinkage vmx_intr_assist(void)
     else
     {
         TRACE(TRC_HVM_INJ_VIRQ, intack.vector, /*fake=*/ 0);
-        vmx_inject_extint(intack.vector, intack.source);
+        vmx_inject_intr(intack.vector, intack.source);
         pt_intr_post(v, intack);
     }
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index e55c90ce7f..7fa404878a 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2022,7 +2022,7 @@ static void __vmx_inject_exception(int trap, int type, int error_code)
         curr->arch.hvm.vmx.vmx_emulate = 1;
 }
 
-void vmx_inject_extint(int trap, uint8_t source)
+void vmx_inject_intr(int trap, uint8_t source)
 {
     struct vcpu *v = current;
     u32    pin_based_cntrl;
@@ -2032,13 +2032,13 @@ void vmx_inject_extint(int trap, uint8_t source)
         if ( pin_based_cntrl & PIN_BASED_EXT_INTR_MASK ) {
             nvmx_enqueue_n2_exceptions (v, 
                INTR_INFO_VALID_MASK |
-               MASK_INSR(X86_ET_EXT_INTR, INTR_INFO_INTR_TYPE_MASK) |
+               MASK_INSR(X86_ET_INTR, INTR_INFO_INTR_TYPE_MASK) |
                MASK_INSR(trap, INTR_INFO_VECTOR_MASK),
                X86_EVENT_NO_EC, source);
             return;
         }
     }
-    __vmx_inject_exception(trap, X86_ET_EXT_INTR, X86_EVENT_NO_EC);
+    __vmx_inject_exception(trap, X86_ET_INTR, X86_EVENT_NO_EC);
 }
 
 void vmx_inject_nmi(void)
@@ -3846,7 +3846,7 @@ gp_fault:
     return X86EMUL_EXCEPTION;
 }
 
-static void vmx_do_extint(struct cpu_user_regs *regs)
+static void vmx_do_intr(struct cpu_user_regs *regs)
 {
     unsigned long vector;
 
@@ -4219,7 +4219,7 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
     switch ( (uint16_t)exit_reason )
     {
     case EXIT_REASON_EXTERNAL_INTERRUPT:
-        vmx_do_extint(regs);
+        vmx_do_intr(regs);
         break;
     case EXIT_REASON_EXCEPTION_NMI:
         __vmread(VM_EXIT_INTR_INFO, &intr_info);
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index a5aa5eb163..e2407f07c2 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1346,7 +1346,7 @@ static void sync_exception_state(struct vcpu *v)
 
     switch ( MASK_EXTR(nvmx->intr.intr_info, INTR_INFO_INTR_TYPE_MASK) )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
         /* rename exit_reason to EXTERNAL_INTERRUPT */
         set_vvmcs(v, VM_EXIT_REASON, EXIT_REASON_EXTERNAL_INTERRUPT);
         set_vvmcs(v, EXIT_QUALIFICATION, 0);
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
index da04752e17..713d0900a9 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
@@ -484,7 +484,7 @@ static inline void vpid_sync_all(void)
 int cf_check vmx_guest_x86_mode(struct vcpu *v);
 unsigned int vmx_get_cpl(void);
 
-void vmx_inject_extint(int trap, uint8_t source);
+void vmx_inject_intr(int trap, uint8_t source);
 void vmx_inject_nmi(void);
 
 void ept_walk_table(struct domain *d, unsigned long gfn);
diff --git a/xen/arch/x86/include/asm/x86-defns.h b/xen/arch/x86/include/asm/x86-defns.h
index cce0f4d990..c210e9e6e1 100644
--- a/xen/arch/x86/include/asm/x86-defns.h
+++ b/xen/arch/x86/include/asm/x86-defns.h
@@ -221,7 +221,7 @@
  * These encodings were first used in VMCB/VMCS fields, but have become
  * architectural in the FRED spec.
  */
-#define X86_ET_EXT_INTR    0 /* External Interrupt */
+#define X86_ET_INTR        0 /* External Interrupt */
 #define X86_ET_NMI         2 /* NMI */
 #define X86_ET_HW_EXC      3 /* Hardware Exception (#PF/#GP/etc) */
 #define X86_ET_SW_INT      4 /* Software Interrupt (INT $n) */
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 1774966305..ac01ba0872 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1041,7 +1041,7 @@ void show_execution_state_nmi(const cpumask_t *mask, bool show_all)
 static const char *x86_et_name(unsigned int type)
 {
     static const char *const names[] = {
-        [X86_ET_EXT_INTR]    = "EXT_INTR",
+        [X86_ET_INTR]        = "INTR",
         [X86_ET_NMI]         = "NMI",
         [X86_ET_HW_EXC]      = "HW_EXC",
         [X86_ET_SW_INT]      = "SW_INT",
@@ -2295,7 +2295,7 @@ void asmlinkage entry_from_pv(struct cpu_user_regs *regs)
 
     switch ( type )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
         return do_IRQ(regs);
 
     case X86_ET_NMI:
@@ -2606,7 +2606,7 @@ void asmlinkage entry_from_xen(struct cpu_user_regs *regs)
 
     switch ( type )
     {
-    case X86_ET_EXT_INTR:
+    case X86_ET_INTR:
         return do_IRQ(regs);
 
     case X86_ET_NMI:
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 830ad90c9c..89c37fea2c 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -8691,7 +8691,7 @@ static void __init __maybe_unused build_assertions(void)
     BUILD_BUG_ON(x86_seg_gs != 5);
 
     /* Check X86_ET_* against VMCB EVENTINJ and VMCS INTR_INFO type fields. */
-    BUILD_BUG_ON(X86_ET_EXT_INTR    != 0);
+    BUILD_BUG_ON(X86_ET_INTR        != 0);
     BUILD_BUG_ON(X86_ET_NMI         != 2);
     BUILD_BUG_ON(X86_ET_HW_EXC      != 3);
     BUILD_BUG_ON(X86_ET_SW_INT      != 4);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 18:44:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 18:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1417760.1646384 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x56EP-0002Ga-4N; Fri, 11 Sep 2026 18:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1417760.1646384; Fri, 11 Sep 2026 18:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x56EP-0002GT-1Y; Fri, 11 Sep 2026 18:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1417760;
 Fri, 11 Sep 2026 18:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x56EO-0002GL-7a
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 18:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x56EN-009ti9-2q
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 18:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x56EO-000qEV-0Y
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 18:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=p0Rah7YN7V2k7jnR+pJLenr+RoCGkvosZ+pJ6nAmvZg=; b=f/MlgQcIYOGHhoOvLuQA6MFJ5G
	HiVqVryICUO7pS2Y7NMu9X5hVe8l/lnp/F10ZmXghzEEC6C5+w5PokUU+8G4pIAG8dghfJgsBjgaC
	ThEU2QjNZumf4rAgdymPvdUPGgj6Q68obwVXwmxpQKYgxs7lH0XOiLeyaAE86mG+T+Vs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] nestedsvm: Fix multi-byte IO port intercept check
Message-Id: <E1x56EO-000qEV-0Y@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 18:44:12 +0000

commit 221f87ad399d99d1dc580a8e3eff7b65f2695aec
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Fri Sep 11 14:23:15 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 11 18:24:25 2026 +0100

    nestedsvm: Fix multi-byte IO port intercept check
    
    For multi-byte IO port accesses, the APM says that SVM should intercept
    if any of the corresponding permission bits are set. However, the code
    has this backwards and only intercepts if all the permission bits are
    set. Fix this and at the same time, make things safer by handling
    mapping failures as intercepted. Also rename the 'enabled' variable to
    make it clearer what it does.
    
    This affects Hyper-V which for the root partition intercepts 0xcf8 and
    0xcfc-0xcff. L2 issues 4 byte CFG index writes to 0xcf8 which are incorrectly
    permitted and update the L1 CFG index. The subsequent L2 CFG data read at 0xcfc
    is intercepted by L1, then resubmitted as a CFG index write followed by CFG
    data read to L0. Since L1 doesn't see the CFG index write by L2, it uses the
    wrong index and gets garbage back, ultimately leading to a failure to boot
    since it cannot access its NVMe disk.
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/hvm/svm/nestedsvm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index eec61238b5..a8b15d6eae 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -830,7 +830,7 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
     ioio_info_t ioinfo;
     uint16_t port;
     unsigned int size;
-    bool enabled;
+    bool intercepted;
 
     ioinfo.bytes = exitinfo1;
     port = ioinfo.fields.port;
@@ -851,8 +851,8 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
 
     for ( io_bitmap = hvm_map_guest_frame_ro(gfn, 0); ; )
     {
-        enabled = io_bitmap && test_bit(port, io_bitmap);
-        if ( !enabled || !--size )
+        intercepted = !io_bitmap || test_bit(port, io_bitmap);
+        if ( intercepted || !--size )
             break;
         if ( unlikely(++port == 8 * PAGE_SIZE) )
         {
@@ -863,7 +863,7 @@ nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
     }
     hvm_unmap_guest_frame(io_bitmap, 0);
 
-    if ( !enabled )
+    if ( !intercepted )
         return NESTEDHVM_VMEXIT_HOST;
 
     return NESTEDHVM_VMEXIT_INJECT;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 11 18:44:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 11 Sep 2026 18:44:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1417761.1646387 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x56EZ-0002In-5q; Fri, 11 Sep 2026 18:44:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1417761.1646387; Fri, 11 Sep 2026 18:44:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x56EZ-0002If-3H; Fri, 11 Sep 2026 18:44:23 +0000
Received: by outflank-mailman (input) for mailman id 1417761;
 Fri, 11 Sep 2026 18:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x56EY-0002IZ-AO
 for xen-changelog@lists.xenproject.org; Fri, 11 Sep 2026 18:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x56EX-009tiW-38
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 18:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x56EY-000qvj-0q
 for xen-changelog@lists.xenproject.org;
 Fri, 11 Sep 2026 18:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=E7atApSmtRpTQ8Wd7KlykjWc+oRNqteZdyQt+nphN/Q=; b=4n1yfWmCvMXEwJpOBFPy97c2XG
	oowbMK0fZVD0bkiXXHL9AUsN/fnbZVrYbAPUvDQ/GM2iLGVMvQHLM1RZttdZQHS7OuGnz0lZcbanJ
	z6bL2XuoeG44G02DJCY2xGOC8SDE+1Eewhaenqrs/edv3ac7s7bvVNFvmVQraEdfIbJQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen: Use __has_include() in xen/percpu.h
Message-Id: <E1x56EY-000qvj-0q@xenbits.xenproject.org>
Date: Fri, 11 Sep 2026 18:44:22 +0000

commit 6bdb8d45b749a4f376d0380ff9503162b14b8468
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed Sep 9 11:59:09 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 11 18:24:25 2026 +0100

    xen: Use __has_include() in xen/percpu.h
    
    Only x86 has an asm/percpu.h.  Have the compiler only include it if it's
    present, rather than symlinking an empty file.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/include/asm/Makefile   |  1 -
 xen/arch/ppc/include/asm/Makefile   |  1 -
 xen/arch/riscv/include/asm/Makefile |  1 -
 xen/include/asm-generic/percpu.h    | 14 --------------
 xen/include/xen/percpu.h            |  4 +++-
 5 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/Makefile
index 4565baca6a..a78a498eb5 100644
--- a/xen/arch/arm/include/asm/Makefile
+++ b/xen/arch/arm/include/asm/Makefile
@@ -5,7 +5,6 @@ generic-y += hardirq.h
 generic-y += iocap.h
 generic-y += irq-dt.h
 generic-y += paging.h
-generic-y += percpu.h
 generic-y += random.h
 generic-y += softirq.h
 generic-y += vm_event.h
diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile
index c989a7f89b..a5c46704cc 100644
--- a/xen/arch/ppc/include/asm/Makefile
+++ b/xen/arch/ppc/include/asm/Makefile
@@ -6,7 +6,6 @@ generic-y += hardirq.h
 generic-y += hypercall.h
 generic-y += iocap.h
 generic-y += paging.h
-generic-y += percpu.h
 generic-y += perfc_defn.h
 generic-y += random.h
 generic-y += softirq.h
diff --git a/xen/arch/riscv/include/asm/Makefile b/xen/arch/riscv/include/asm/Makefile
index 86c56251d5..d348369927 100644
--- a/xen/arch/riscv/include/asm/Makefile
+++ b/xen/arch/riscv/include/asm/Makefile
@@ -6,7 +6,6 @@ generic-y += hardirq.h
 generic-y += hypercall.h
 generic-y += iocap.h
 generic-y += irq-dt.h
-generic-y += percpu.h
 generic-y += random.h
 generic-y += softirq.h
 generic-y += vm_event.h
diff --git a/xen/include/asm-generic/percpu.h b/xen/include/asm-generic/percpu.h
deleted file mode 100644
index 3fdb3a2a02..0000000000
--- a/xen/include/asm-generic/percpu.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __ASM_GENERIC_PERCPU_H__
-#define __ASM_GENERIC_PERCPU_H__
-
-#endif /* __ASM_GENERIC_PERCPU_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/include/xen/percpu.h b/xen/include/xen/percpu.h
index 30609f49f0..d324671b5b 100644
--- a/xen/include/xen/percpu.h
+++ b/xen/include/xen/percpu.h
@@ -27,7 +27,9 @@
 
 #define get_per_cpu_var(var)  (per_cpu__##var)
 
-#include <asm/percpu.h>
+#if __has_include(<asm/percpu.h>)
+# include <asm/percpu.h>
+#endif
 
 #ifndef __ASSEMBLER__
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 09:55:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 09:55:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421584.1647355 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6PsW-0003im-03; Tue, 15 Sep 2026 09:55:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421584.1647355; Tue, 15 Sep 2026 09:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6PsV-0003ie-Ti; Tue, 15 Sep 2026 09:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1421584;
 Tue, 15 Sep 2026 09:55:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6PsV-0003iY-5X
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 09:55:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6PsU-00GMcK-0s
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 09:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6PsU-003bda-1n
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 09:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VEAldPJfkLhW+hJk4KoVDiHlrAz28GS25FP0YYuKoQs=; b=LjdqJnLz5cs98dVjwRNTGiLMBf
	aQQRno5MkXNDdPVvWhot9y4NV2A3NjV9PSEmUlRu3iOx8Lr/N59x4V/Ia3ayvJPQ4SI3iEUaTQIZ0
	QY+xfS44Ex79b0OCvirQwXytfJGX2pauW3poB78UGbuGkw/ColSqAK07WleSnjRrPmVg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/build: Remove leading space in xen.efi.S rule
Message-Id: <E1x6PsU-003bda-1n@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 09:55:02 +0000

commit 5838665ef12a03112a50bfc2d8e34884503a90a8
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Sep 11 21:16:01 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 15 11:46:07 2026 +0200

    x86/build: Remove leading space in xen.efi.S rule
    
    It happens to be benign, but it causes emacs to ask:
    
      Suspicious line 194. Save anyway? (y or n)
    
    whenever saving the file.
    
    Fixes: da944a72fdf4 ("x86: split xen-syms/xen.efi linking rules")
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index ee2573c2fb..8a205c3d27 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -191,7 +191,7 @@ ifeq ($(XEN_BUILD_PE),y)
 .$(TARGET).efi.%s.S:
 	$(NM) -pa --format=sysv $< \
 	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
- 	    --source-name=$(TARGET).efi.S \
+	    --source-name=$(TARGET).efi.S \
 	  > $@
 
 # See above for why $(note_file) needs removing here.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 09:55:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 09:55:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421585.1647360 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Psg-0003kV-1L; Tue, 15 Sep 2026 09:55:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421585.1647360; Tue, 15 Sep 2026 09:55:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Psf-0003kO-V2; Tue, 15 Sep 2026 09:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1421585;
 Tue, 15 Sep 2026 09:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6Pse-0003kG-NY
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 09:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Pse-00GMcW-1D
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 09:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Pse-003cPw-26
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 09:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=U3QPTtkz7fRzdSYvaeL0RYjbxIKZCfOIkYvM7Lr+UV4=; b=Ne7BCxzozZxZoJOL6LUkrfIptX
	9ntfUg2Ghh2NeqAA2dlcVI+0R/2YOp5A8VowcMuHcASrCvKUu9QZ9IXcg+pnGvV0Z7djRnpRyBodH
	b/fWI5/mEfCMWt/s7D4+rFfbtVbq8iJl/p7DcctII4GYMWIPm+XY/2ICtV9KdYzmHpN8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Add basic b4 config file
Message-Id: <E1x6Pse-003cPw-26@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 09:55:12 +0000

commit 4830ddbee3aa4198a5d4d753e7d1f3ee05c199f3
Author:     Baptiste Le Duc <baptiste.le-duc@vates.tech>
AuthorDate: Tue Sep 15 11:06:43 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 15 11:46:07 2026 +0200

    Add basic b4 config file
    
    b4[1] is a convenient tool for mail-based contribution. A config file[2]
    tracked in the tree lets the project ship a few defaults that match the Xen
    patch submission rules.
    
    This aims to help new contributors who have never used a mailing list avoid
    mistakes when sending their patch series.
    
    The tree has no scripts/checkpatch.pl or equivalent, so there is nothing
    for b4 to run per patch. Disable the needs-checking pre-flight check so a
    series can be sent without first running b4 prep --check.
    
    [1] https://pypi.org/project/b4/
    [2] https://b4.docs.kernel.org/en/latest/config.html
    
    Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 .b4-config | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.b4-config b/.b4-config
new file mode 100644
index 0000000000..e5e2435ec4
--- /dev/null
+++ b/.b4-config
@@ -0,0 +1,10 @@
+#
+# Common b4 settings for sending patches to the Xen Project upstream.
+# https://b4.docs.kernel.org/
+#
+
+[b4]
+	send-series-to = xen-devel@lists.xenproject.org
+	send-auto-to-cmd = echo
+	send-auto-cc-cmd = ./scripts/get_maintainer.pl
+	midmask = https://lore.kernel.org/xen-devel/%s
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 15:22:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 15:22:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421912.1647535 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Uyw-0003YI-Mx; Tue, 15 Sep 2026 15:22:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421912.1647535; Tue, 15 Sep 2026 15:22:02 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Uyw-0003YA-KF; Tue, 15 Sep 2026 15:22:02 +0000
Received: by outflank-mailman (input) for mailman id 1421912;
 Tue, 15 Sep 2026 15:22:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6Uyv-0003Y2-U9
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 15:22:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Uyv-00GSyr-16
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Uyv-00Cb59-1y
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=f0ghKkHii01aPzeEvFY7umvaEye1aCxErkfhslwO8y8=; b=3UjA0jA65RnSwaQi9g+9xpXqZQ
	v1zAmkabRONmVM8prOeJRpO42q2jmb01b7mEyj4P1Ki8dLeUt7Lr1W5biGCK1iPjvNMfp5bRGktYz
	wDLOJ4rEYAIgSyo6Q9vtjmUooOBha8Vl+3BxPDRc99HyGM85SUOMGUXQ3eLIfvpEjMtw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] cmdline: Document console=dtuart option
Message-Id: <E1x6Uyv-00Cb59-1y@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 15:22:01 +0000

commit 422484e55cc2856a2f46e3e025115c678c388414
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Sep 2 09:36:04 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    cmdline: Document console=dtuart option
    
    Document the default console= option on Arm and RISC-V that is
    "dtuart" indicating a generic UART parsed from a device tree or
    ACPI SPCR table. This serial utilizes SERHND_DTUART handle.
    
    Take the opportunity to:
     - fix documented x86 default to vga to match OPT_CONSOLE_STR,
     - mark dtuart option as available on RISC-V,
     - document fall back to /chosen/stdout-path.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 docs/misc/xen-command-line.pandoc | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc
index 95cc3312f1..b2c94ae56d 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -438,9 +438,10 @@ The following are examples of correct specifications:
 Specify the size of the console ring buffer.
 
 ### console
-> `= List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | none ]`
+> `= List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | dtuart | none ]`
 
-> Default: `console=com1,vga`
+> Default (x86): `console=vga`
+> Default (Arm, RISC-V): `console=dtuart`
 
 Specify which console(s) Xen should use.
 
@@ -462,6 +463,10 @@ compiled with `CONFIG_XEN_GUEST` enabled.
 
 `xhci` indicates that Xen should use a USB3 debug port.
 
+`dtuart` indicates that Xen should use a generic UART (parsed from a device
+tree or ACPI SPCR table). Only available if Xen was compiled with
+`CONFIG_GENERIC_UART_INIT` enabled.
+
 `none` indicates that Xen should not use a console.  This option only
 makes sense on its own.
 
@@ -1077,13 +1082,15 @@ affinities to prefer but be not limited to the specified node(s).
 
 Pin dom0 vcpus to their respective pcpus
 
-### dtuart (ARM)
+### dtuart (ARM, RISC-V)
 > `= path [:options]`
 
 > Default: `""`
 
 Specify the full path in the device tree for the UART.  If the path doesn't
 start with `/`, it is assumed to be an alias.  The options are device specific.
+If the option is left empty, Xen will try to probe the device from the DT
+property /chosen/stdout-path if present.
 
 ### e820-mtrr-clip (x86)
 > `= <boolean>`
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 15:22:12 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 15:22:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421913.1647539 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Uz6-0003ab-OL; Tue, 15 Sep 2026 15:22:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421913.1647539; Tue, 15 Sep 2026 15:22:12 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Uz6-0003aQ-La; Tue, 15 Sep 2026 15:22:12 +0000
Received: by outflank-mailman (input) for mailman id 1421913;
 Tue, 15 Sep 2026 15:22:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6Uz5-0003aB-PU
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 15:22:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Uz5-00GSyx-1O
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Uz5-00Cbil-2K
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=v3h+QI4yzOP945Uq75u+Y5XhhtigDgDBMwCwMCefBzw=; b=HuFEl6daGAwa6zAB02gJ1MxiLD
	Lb2HC9dbY6HIsfEdQU2p+cvQKDZ4v1K2iebb/5uI6+kwozgDl/9a3WeREK8s2olu6JgoTEd/hvJlU
	3qvBuIcuF3PW/YRUAu0ypgdtRGt4EvyKUqae/bINqGycCFpR5ouI1NZf1JHnIiZovIgk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] drivers/char: Check if console=dtuart for ACPI SPCR serial bring up
Message-Id: <E1x6Uz5-00Cbil-2K@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 15:22:11 +0000

commit 12b136a965ce5a841ef9a9efb9c91d08661949d4
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Sep 2 09:36:05 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    drivers/char: Check if console=dtuart for ACPI SPCR serial bring up
    
    dtuart denotes a generic UART parsed from a device tree (back then it
    was the only method, hence dt prefix) or ACPI SPCR table (they all use
    the SERHND_DTUART serial handle). Currently we only check if console= is
    set to dtuart in the DT flow and not in the ACPI flow. This means that
    even if we set console=none we would still bring up ACPI parsed
    serial device for nothing. Move the check to uart_init() to cover both
    paths.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/char/uart-init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c
index a218139938..eb7f855495 100644
--- a/xen/drivers/char/uart-init.c
+++ b/xen/drivers/char/uart-init.c
@@ -38,9 +38,6 @@ static void __init dt_uart_init(void)
     const char *options;
     char *split;
 
-    if ( !console_has("dtuart") )
-        return; /* Not for us */
-
     if ( !strcmp(opt_dtuart, "") )
     {
         const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
@@ -121,6 +118,9 @@ static void __init acpi_uart_init(void) { }
 
 void __init uart_init(void)
 {
+    if ( !console_has("dtuart") )
+        return; /* Not for us */
+
     if ( acpi_disabled )
         dt_uart_init();
     else
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 15:22:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 15:22:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421914.1647542 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6UzG-0003cp-Pc; Tue, 15 Sep 2026 15:22:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421914.1647542; Tue, 15 Sep 2026 15:22:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6UzG-0003ci-Mz; Tue, 15 Sep 2026 15:22:22 +0000
Received: by outflank-mailman (input) for mailman id 1421914;
 Tue, 15 Sep 2026 15:22:21 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6UzF-0003cY-SG
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 15:22:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6UzF-00GSz4-1g
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6UzF-00CcJs-2c
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5FIkFnAi6O2hZvljlG4tttNrby2bz+8Bg/9Oawd1MB0=; b=RII5GgKq4xg0aVgoirNBv6nkOZ
	WaTET+X3EYiWmlmG95zTZL7+v/EY6ZwH0E17iDEt++Y7HOZvi7s45FHkeXuqA5msc8FhrDLAw/yCW
	rxmKT5omUEpbBu/Ogu9vKjI4YJNxRN1dcuSXx72uNDHEDbBHAx4hbR0o3CkGFEJ7m56Q=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] drivers/char: Panic when the requested UART fails to initialise
Message-Id: <E1x6UzF-00CcJs-2c@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 15:22:21 +0000

commit 20ee984e1df26b83d0b29565afe20354ea5a4f87
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Sep 2 09:36:06 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    drivers/char: Panic when the requested UART fails to initialise
    
    uart_init() cannot tell its caller that the UART the user asked for did
    not come up: every failure path only printks. Arm and RISC-V carry on
    into console_init_preirq() and boot without a console, rather than
    refusing to boot as they do elsewhere when a user request cannot be met.
    
    Return an error from dt_uart_init() and panic in start_xen(). An
    explicit request Xen cannot satisfy should stop the boot rather than
    silently degrade it, which is what start_xen() already does for the rest
    of the boot configuration.
    
    Only a path given on the command line counts as a request we have to
    satisfy. Falling back to /chosen/stdout-path or acpi_uart_init()
    therefore never fails. SPCR is firmware provided, the analogue of
    stdout-path, and there is no ACPI equivalent of dtuart= to make an
    explicit request with.
    
    While here, decide whether the SPCR table was found from the returned
    acpi_status rather than from the table pointer, which was only NULL
    because the caller initialised it - acpi_get_table() writes it solely
    on success.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
---
 xen/arch/arm/setup.c         |  5 ++++-
 xen/arch/riscv/setup.c       |  6 ++++-
 xen/drivers/char/uart-init.c | 52 +++++++++++++++++++++++++-------------------
 xen/include/xen/serial.h     |  6 ++++-
 4 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 86532d0a35..79bbf24305 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -377,7 +377,10 @@ void asmlinkage __init noreturn start_xen(unsigned long fdt_paddr)
 
     gic_preinit();
 
-    uart_init();
+    rc = uart_init();
+    if ( rc )
+        panic("Failed to initialize the requested UART (%d)\n", rc);
+
     console_init_preirq();
     console_init_ring();
 
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 56a0907a85..07f46ac3ce 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -77,6 +77,7 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
 {
     const char *cmdline;
     size_t fdt_size;
+    int rc;
 
     remove_identity_mapping();
 
@@ -149,7 +150,10 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
 
     intc_preinit();
 
-    uart_init();
+    rc = uart_init();
+    if ( rc )
+        panic("Failed to initialize the requested UART (%d)\n", rc);
+
     console_init_preirq();
 
     intc_init();
diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c
index eb7f855495..b79135be96 100644
--- a/xen/drivers/char/uart-init.c
+++ b/xen/drivers/char/uart-init.c
@@ -30,15 +30,17 @@
 static char __initdata opt_dtuart[256] = "";
 string_param("dtuart", opt_dtuart);
 
-static void __init dt_uart_init(void)
+static int __init dt_uart_init(void)
 {
     struct dt_device_node *dev;
     int ret;
     const char *devpath = opt_dtuart;
     const char *options;
     char *split;
+    /* Set on the command line, as opposed to inherited from /chosen */
+    bool explicit_request = strcmp(opt_dtuart, "") != 0;
 
-    if ( !strcmp(opt_dtuart, "") )
+    if ( !explicit_request )
     {
         const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
 
@@ -62,7 +64,12 @@ static void __init dt_uart_init(void)
     if ( !strcmp(opt_dtuart, "") )
     {
         printk("No dtuart path configured\n");
-        return;
+
+        /*
+         * console=dtuart is the compiled-in default, so an absent dtuart= is
+         * not a failed user request.
+         */
+        return 0;
     }
 
     split = strchr(opt_dtuart, ':');
@@ -83,48 +90,49 @@ static void __init dt_uart_init(void)
     if ( !dev )
     {
         printk("Unable to find device \"%s\"\n", devpath);
-        return;
+        return explicit_request ? -ENODEV : 0;
     }
 
     ret = device_init(dev, DEVICE_SERIAL, options);
-
     if ( ret )
         printk("Unable to initialize dtuart: %d\n", ret);
+
+    return explicit_request ? ret : 0;
 }
 
 #ifdef CONFIG_ACPI
-static void __init acpi_uart_init(void)
+static int __init acpi_uart_init(void)
 {
-    struct acpi_table_spcr *spcr = NULL;
+    struct acpi_table_spcr *spcr;
+    acpi_status status;
     int ret;
 
-    acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&spcr);
+    /* SPCR is firmware provided, so nothing here is a failed user request */
+    status = acpi_get_table(ACPI_SIG_SPCR, 0,
+                            (struct acpi_table_header **)&spcr);
 
-    if ( spcr == NULL )
+    if ( ACPI_FAILURE(status) )
     {
         printk("Unable to get spcr table\n");
+        return 0;
     }
-    else
-    {
-        ret = acpi_device_init(DEVICE_SERIAL, NULL, spcr->interface_type);
 
-        if ( ret )
-            printk("Unable to initialize acpi uart: %d\n", ret);
-    }
+    ret = acpi_device_init(DEVICE_SERIAL, NULL, spcr->interface_type);
+    if ( ret )
+        printk("Unable to initialize acpi uart: %d\n", ret);
+
+    return 0;
 }
 #else
-static void __init acpi_uart_init(void) { }
+static int __init acpi_uart_init(void) { return 0; }
 #endif
 
-void __init uart_init(void)
+int __init uart_init(void)
 {
     if ( !console_has("dtuart") )
-        return; /* Not for us */
+        return 0; /* Not for us */
 
-    if ( acpi_disabled )
-        dt_uart_init();
-    else
-        acpi_uart_init();
+    return acpi_disabled ? dt_uart_init() : acpi_uart_init();
 }
 
 /*
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 8e18445552..3a71da767d 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -170,7 +170,11 @@ void xhci_dbc_uart_init(void);
 static void inline xhci_dbc_uart_init(void) {}
 #endif
 
-void uart_init(void);
+/*
+ * Returns 0 unless a UART explicitly requested via dtuart= failed to
+ * initialise.
+ */
+int uart_init(void);
 
 struct physdev_dbgp_op;
 int dbgp_op(const struct physdev_dbgp_op *op);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 15:22:32 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 15:22:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421915.1647547 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6UzQ-0003f9-R1; Tue, 15 Sep 2026 15:22:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421915.1647547; Tue, 15 Sep 2026 15:22:32 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6UzQ-0003f1-OU; Tue, 15 Sep 2026 15:22:32 +0000
Received: by outflank-mailman (input) for mailman id 1421915;
 Tue, 15 Sep 2026 15:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6UzP-0003er-VZ
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 15:22:31 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6UzP-00GSzC-1z
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:31 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6UzP-00Ccyj-2t
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 15:22:31 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=inqX04lg7OhhU/U0ZEIDdUWpqEpHqrj9y3nk8XzOJDg=; b=MA0bubRI+2eckYUDNnuNwM6/wA
	XbrnrjYD8hSxToY/uE8XrQp1C01yb63vvMzcp+6e+8Lq2Bldii5U4bUM2QE/w90McNeKSlPue/pNA
	3aSNPOFlbVS6+psjKZkj5YnBOWLJo6TOT+8WkxL0JahLvqJBt23m/4rrI33zVuzxFRv0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x6UzP-00Ccyj-2t@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 15:22:31 +0000

commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 16:11:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 16:11:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421949.1647569 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6VkN-0002tj-E0; Tue, 15 Sep 2026 16:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421949.1647569; Tue, 15 Sep 2026 16:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6VkN-0002tb-BQ; Tue, 15 Sep 2026 16:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1421949;
 Tue, 15 Sep 2026 16:11:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6VkL-0002tV-Rp
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 16:11:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6VkL-00GUP3-1E
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6VkL-00G5jg-27
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=6RfjaNzRrcl42lILg4vA0whNkLmPxXuQmYFgq3T7VC0=; b=19WrAWu6UDaMG7IohJZ+Aic4jw
	bkpqgjFRQsCZCu1uykw7229Q0sJndJ61fzljErJbe5FOMBsoGNeHb3M28cOLUquKp7Uox8bGJWj8v
	d+3yS7Ggl5dMb+QnOppe6uEgI3wnIaCWyzJsTSmwoaG2En2TMk+UShc8uaz34t3AQloo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/build: Remove leading space in xen.efi.S rule
Message-Id: <E1x6VkL-00G5jg-27@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 16:11:01 +0000

commit 5838665ef12a03112a50bfc2d8e34884503a90a8
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Sep 11 21:16:01 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 15 11:46:07 2026 +0200

    x86/build: Remove leading space in xen.efi.S rule
    
    It happens to be benign, but it causes emacs to ask:
    
      Suspicious line 194. Save anyway? (y or n)
    
    whenever saving the file.
    
    Fixes: da944a72fdf4 ("x86: split xen-syms/xen.efi linking rules")
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index ee2573c2fb..8a205c3d27 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -191,7 +191,7 @@ ifeq ($(XEN_BUILD_PE),y)
 .$(TARGET).efi.%s.S:
 	$(NM) -pa --format=sysv $< \
 	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
- 	    --source-name=$(TARGET).efi.S \
+	    --source-name=$(TARGET).efi.S \
 	  > $@
 
 # See above for why $(note_file) needs removing here.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 16:11:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 16:11:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421950.1647573 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6VkX-0002vr-FY; Tue, 15 Sep 2026 16:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421950.1647573; Tue, 15 Sep 2026 16:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6VkX-0002vj-Cp; Tue, 15 Sep 2026 16:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1421950;
 Tue, 15 Sep 2026 16:11:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6VkV-0002vT-R7
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 16:11:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6VkV-00GUP7-1Y
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6VkV-00G6V5-2S
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/UM+gjggbeL4CcVAMCt9ckfQAQR/IbAGnA59cAxcnSA=; b=mPiZYmKUV8dedwVLRKAq6sghf+
	bPBUJbhmg9xiOLvucmFpP0JOZLvyqzYPmxFI2higsKXyWiJSdSN6k5Jda36tODgNN6CtihYlvo7Nd
	jWOpLDzgTRAfP3Z+mw8uCJ3cVyjIxfK3hfTVGN0f4w8M6pXYAZlcbS63uzn9boojKC8I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Add basic b4 config file
Message-Id: <E1x6VkV-00G6V5-2S@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 16:11:11 +0000

commit 4830ddbee3aa4198a5d4d753e7d1f3ee05c199f3
Author:     Baptiste Le Duc <baptiste.le-duc@vates.tech>
AuthorDate: Tue Sep 15 11:06:43 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 15 11:46:07 2026 +0200

    Add basic b4 config file
    
    b4[1] is a convenient tool for mail-based contribution. A config file[2]
    tracked in the tree lets the project ship a few defaults that match the Xen
    patch submission rules.
    
    This aims to help new contributors who have never used a mailing list avoid
    mistakes when sending their patch series.
    
    The tree has no scripts/checkpatch.pl or equivalent, so there is nothing
    for b4 to run per patch. Disable the needs-checking pre-flight check so a
    series can be sent without first running b4 prep --check.
    
    [1] https://pypi.org/project/b4/
    [2] https://b4.docs.kernel.org/en/latest/config.html
    
    Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 .b4-config | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.b4-config b/.b4-config
new file mode 100644
index 0000000000..e5e2435ec4
--- /dev/null
+++ b/.b4-config
@@ -0,0 +1,10 @@
+#
+# Common b4 settings for sending patches to the Xen Project upstream.
+# https://b4.docs.kernel.org/
+#
+
+[b4]
+	send-series-to = xen-devel@lists.xenproject.org
+	send-auto-to-cmd = echo
+	send-auto-cc-cmd = ./scripts/get_maintainer.pl
+	midmask = https://lore.kernel.org/xen-devel/%s
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 16:11:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 16:11:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421951.1647577 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Vkh-0002xm-Ge; Tue, 15 Sep 2026 16:11:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421951.1647577; Tue, 15 Sep 2026 16:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Vkh-0002xe-E6; Tue, 15 Sep 2026 16:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1421951;
 Tue, 15 Sep 2026 16:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6Vkf-0002xQ-UI
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 16:11:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vkf-00GUPB-1s
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vkf-00G7T0-2o
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=G/BsGcBh+/Iripm37yh+kTD7IdosOlDt0SQztuJ09fU=; b=pc5wEnNnc/mmi3Bq3vvUylyqPN
	hplQ5KLNk1S0wYV+Tx8YIO65u7JJSQzl6vsWAvQckIg2++HJsXpu+BaUbcmwP2i0gZ+gAdbasCPOD
	hh9R1z69wQvCqi4YPE7W0fNC39sdMNhvQ4q0Qfi/HHq0CloyEg5nuSykskX6TtTRTgNE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] cmdline: Document console=dtuart option
Message-Id: <E1x6Vkf-00G7T0-2o@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 16:11:21 +0000

commit 422484e55cc2856a2f46e3e025115c678c388414
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Sep 2 09:36:04 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    cmdline: Document console=dtuart option
    
    Document the default console= option on Arm and RISC-V that is
    "dtuart" indicating a generic UART parsed from a device tree or
    ACPI SPCR table. This serial utilizes SERHND_DTUART handle.
    
    Take the opportunity to:
     - fix documented x86 default to vga to match OPT_CONSOLE_STR,
     - mark dtuart option as available on RISC-V,
     - document fall back to /chosen/stdout-path.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 docs/misc/xen-command-line.pandoc | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc
index 95cc3312f1..b2c94ae56d 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -438,9 +438,10 @@ The following are examples of correct specifications:
 Specify the size of the console ring buffer.
 
 ### console
-> `= List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | none ]`
+> `= List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | dtuart | none ]`
 
-> Default: `console=com1,vga`
+> Default (x86): `console=vga`
+> Default (Arm, RISC-V): `console=dtuart`
 
 Specify which console(s) Xen should use.
 
@@ -462,6 +463,10 @@ compiled with `CONFIG_XEN_GUEST` enabled.
 
 `xhci` indicates that Xen should use a USB3 debug port.
 
+`dtuart` indicates that Xen should use a generic UART (parsed from a device
+tree or ACPI SPCR table). Only available if Xen was compiled with
+`CONFIG_GENERIC_UART_INIT` enabled.
+
 `none` indicates that Xen should not use a console.  This option only
 makes sense on its own.
 
@@ -1077,13 +1082,15 @@ affinities to prefer but be not limited to the specified node(s).
 
 Pin dom0 vcpus to their respective pcpus
 
-### dtuart (ARM)
+### dtuart (ARM, RISC-V)
 > `= path [:options]`
 
 > Default: `""`
 
 Specify the full path in the device tree for the UART.  If the path doesn't
 start with `/`, it is assumed to be an alias.  The options are device specific.
+If the option is left empty, Xen will try to probe the device from the DT
+property /chosen/stdout-path if present.
 
 ### e820-mtrr-clip (x86)
 > `= <boolean>`
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 16:11:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 16:11:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421952.1647580 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Vkr-00031n-JB; Tue, 15 Sep 2026 16:11:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421952.1647580; Tue, 15 Sep 2026 16:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Vkr-00031f-Gf; Tue, 15 Sep 2026 16:11:33 +0000
Received: by outflank-mailman (input) for mailman id 1421952;
 Tue, 15 Sep 2026 16:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6Vkq-00031X-1Z
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 16:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vkp-00GUPG-2C
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vkp-00G8bI-36
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:31 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=wClByR0f6FNxFWqucZxgs2jBl/T2k4UGSl/868C9Rvo=; b=280+gKfKWVMvIby+45VzULW4/C
	QncsI1rMAzW7DmnRR79yu1P9CGvmbYyj5UiQjUte6nqsGAMlXdsBd9mRNe+qv/yVv0URnE0NZtp5N
	0MM/tdEn1xgOBNkprWGSSSh5WGlIwILMyWac/x9iHZ7DuASoQMh7uEp6RMBu0PxjByH8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] drivers/char: Check if console=dtuart for ACPI SPCR serial bring up
Message-Id: <E1x6Vkp-00G8bI-36@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 16:11:31 +0000

commit 12b136a965ce5a841ef9a9efb9c91d08661949d4
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Sep 2 09:36:05 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    drivers/char: Check if console=dtuart for ACPI SPCR serial bring up
    
    dtuart denotes a generic UART parsed from a device tree (back then it
    was the only method, hence dt prefix) or ACPI SPCR table (they all use
    the SERHND_DTUART serial handle). Currently we only check if console= is
    set to dtuart in the DT flow and not in the ACPI flow. This means that
    even if we set console=none we would still bring up ACPI parsed
    serial device for nothing. Move the check to uart_init() to cover both
    paths.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/char/uart-init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c
index a218139938..eb7f855495 100644
--- a/xen/drivers/char/uart-init.c
+++ b/xen/drivers/char/uart-init.c
@@ -38,9 +38,6 @@ static void __init dt_uart_init(void)
     const char *options;
     char *split;
 
-    if ( !console_has("dtuart") )
-        return; /* Not for us */
-
     if ( !strcmp(opt_dtuart, "") )
     {
         const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
@@ -121,6 +118,9 @@ static void __init acpi_uart_init(void) { }
 
 void __init uart_init(void)
 {
+    if ( !console_has("dtuart") )
+        return; /* Not for us */
+
     if ( acpi_disabled )
         dt_uart_init();
     else
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 16:11:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 16:11:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421953.1647584 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Vl1-00033h-KU; Tue, 15 Sep 2026 16:11:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421953.1647584; Tue, 15 Sep 2026 16:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6Vl1-00033Z-Hz; Tue, 15 Sep 2026 16:11:43 +0000
Received: by outflank-mailman (input) for mailman id 1421953;
 Tue, 15 Sep 2026 16:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6Vl0-00033O-4J
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 16:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vkz-00GUS2-2V
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vl0-00G9mm-0C
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PkIYy0/42fMBEBKKbKhQYj/EBpvZChBkYFiGOb/6ynw=; b=s3VMkKYVKMO7Gs1Prp70IqPPiC
	cgEnDWoRs9BWqw+3DSUswjdS37a/4CPRwBqY6wAdH2HMqzA0o6bfaUn/K+rBMkTB8obQ4KkCdkqwd
	GP798wK4i4hVhc5mPwRFIRYyu7vN8WPFp4ujs5SEBEMoyCkEm1ujNI9yljaq3wyHXIUs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] drivers/char: Panic when the requested UART fails to initialise
Message-Id: <E1x6Vl0-00G9mm-0C@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 16:11:42 +0000

commit 20ee984e1df26b83d0b29565afe20354ea5a4f87
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Sep 2 09:36:06 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    drivers/char: Panic when the requested UART fails to initialise
    
    uart_init() cannot tell its caller that the UART the user asked for did
    not come up: every failure path only printks. Arm and RISC-V carry on
    into console_init_preirq() and boot without a console, rather than
    refusing to boot as they do elsewhere when a user request cannot be met.
    
    Return an error from dt_uart_init() and panic in start_xen(). An
    explicit request Xen cannot satisfy should stop the boot rather than
    silently degrade it, which is what start_xen() already does for the rest
    of the boot configuration.
    
    Only a path given on the command line counts as a request we have to
    satisfy. Falling back to /chosen/stdout-path or acpi_uart_init()
    therefore never fails. SPCR is firmware provided, the analogue of
    stdout-path, and there is no ACPI equivalent of dtuart= to make an
    explicit request with.
    
    While here, decide whether the SPCR table was found from the returned
    acpi_status rather than from the table pointer, which was only NULL
    because the caller initialised it - acpi_get_table() writes it solely
    on success.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
---
 xen/arch/arm/setup.c         |  5 ++++-
 xen/arch/riscv/setup.c       |  6 ++++-
 xen/drivers/char/uart-init.c | 52 +++++++++++++++++++++++++-------------------
 xen/include/xen/serial.h     |  6 ++++-
 4 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 86532d0a35..79bbf24305 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -377,7 +377,10 @@ void asmlinkage __init noreturn start_xen(unsigned long fdt_paddr)
 
     gic_preinit();
 
-    uart_init();
+    rc = uart_init();
+    if ( rc )
+        panic("Failed to initialize the requested UART (%d)\n", rc);
+
     console_init_preirq();
     console_init_ring();
 
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 56a0907a85..07f46ac3ce 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -77,6 +77,7 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
 {
     const char *cmdline;
     size_t fdt_size;
+    int rc;
 
     remove_identity_mapping();
 
@@ -149,7 +150,10 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
 
     intc_preinit();
 
-    uart_init();
+    rc = uart_init();
+    if ( rc )
+        panic("Failed to initialize the requested UART (%d)\n", rc);
+
     console_init_preirq();
 
     intc_init();
diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c
index eb7f855495..b79135be96 100644
--- a/xen/drivers/char/uart-init.c
+++ b/xen/drivers/char/uart-init.c
@@ -30,15 +30,17 @@
 static char __initdata opt_dtuart[256] = "";
 string_param("dtuart", opt_dtuart);
 
-static void __init dt_uart_init(void)
+static int __init dt_uart_init(void)
 {
     struct dt_device_node *dev;
     int ret;
     const char *devpath = opt_dtuart;
     const char *options;
     char *split;
+    /* Set on the command line, as opposed to inherited from /chosen */
+    bool explicit_request = strcmp(opt_dtuart, "") != 0;
 
-    if ( !strcmp(opt_dtuart, "") )
+    if ( !explicit_request )
     {
         const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
 
@@ -62,7 +64,12 @@ static void __init dt_uart_init(void)
     if ( !strcmp(opt_dtuart, "") )
     {
         printk("No dtuart path configured\n");
-        return;
+
+        /*
+         * console=dtuart is the compiled-in default, so an absent dtuart= is
+         * not a failed user request.
+         */
+        return 0;
     }
 
     split = strchr(opt_dtuart, ':');
@@ -83,48 +90,49 @@ static void __init dt_uart_init(void)
     if ( !dev )
     {
         printk("Unable to find device \"%s\"\n", devpath);
-        return;
+        return explicit_request ? -ENODEV : 0;
     }
 
     ret = device_init(dev, DEVICE_SERIAL, options);
-
     if ( ret )
         printk("Unable to initialize dtuart: %d\n", ret);
+
+    return explicit_request ? ret : 0;
 }
 
 #ifdef CONFIG_ACPI
-static void __init acpi_uart_init(void)
+static int __init acpi_uart_init(void)
 {
-    struct acpi_table_spcr *spcr = NULL;
+    struct acpi_table_spcr *spcr;
+    acpi_status status;
     int ret;
 
-    acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&spcr);
+    /* SPCR is firmware provided, so nothing here is a failed user request */
+    status = acpi_get_table(ACPI_SIG_SPCR, 0,
+                            (struct acpi_table_header **)&spcr);
 
-    if ( spcr == NULL )
+    if ( ACPI_FAILURE(status) )
     {
         printk("Unable to get spcr table\n");
+        return 0;
     }
-    else
-    {
-        ret = acpi_device_init(DEVICE_SERIAL, NULL, spcr->interface_type);
 
-        if ( ret )
-            printk("Unable to initialize acpi uart: %d\n", ret);
-    }
+    ret = acpi_device_init(DEVICE_SERIAL, NULL, spcr->interface_type);
+    if ( ret )
+        printk("Unable to initialize acpi uart: %d\n", ret);
+
+    return 0;
 }
 #else
-static void __init acpi_uart_init(void) { }
+static int __init acpi_uart_init(void) { return 0; }
 #endif
 
-void __init uart_init(void)
+int __init uart_init(void)
 {
     if ( !console_has("dtuart") )
-        return; /* Not for us */
+        return 0; /* Not for us */
 
-    if ( acpi_disabled )
-        dt_uart_init();
-    else
-        acpi_uart_init();
+    return acpi_disabled ? dt_uart_init() : acpi_uart_init();
 }
 
 /*
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 8e18445552..3a71da767d 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -170,7 +170,11 @@ void xhci_dbc_uart_init(void);
 static void inline xhci_dbc_uart_init(void) {}
 #endif
 
-void uart_init(void);
+/*
+ * Returns 0 unless a UART explicitly requested via dtuart= failed to
+ * initialise.
+ */
+int uart_init(void);
 
 struct physdev_dbgp_op;
 int dbgp_op(const struct physdev_dbgp_op *op);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 15 16:11:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 15 Sep 2026 16:11:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1421954.1647589 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6VlB-00035a-MA; Tue, 15 Sep 2026 16:11:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1421954.1647589; Tue, 15 Sep 2026 16:11:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x6VlB-00035R-JN; Tue, 15 Sep 2026 16:11:53 +0000
Received: by outflank-mailman (input) for mailman id 1421954;
 Tue, 15 Sep 2026 16:11:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x6VlA-00035I-7I
 for xen-changelog@lists.xenproject.org; Tue, 15 Sep 2026 16:11:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6Vl9-00GUSA-2p
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x6VlA-00GAZA-0V
 for xen-changelog@lists.xenproject.org;
 Tue, 15 Sep 2026 16:11:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=I9lYeDLDiu3sU7IT5O7Xc63V1PRX9+PtzmdE3h/tFrc=; b=GWrLCpwpWaHZUZJQS8g4sos4V0
	tLIJ2H+lH2ltXKiKkvxPwoEqKMiRUd+cIIcQNmNKH6f+U4olIQpMuwyQSEJZOqv7sUXEU/mxjIjco
	QwiKQEfQG+6YOVHscpk062tTlcdtNJ9lYEk4nWqdzk7ZwU0k5KAeq9x6iKLhLaaUmN5c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x6VlA-00GAZA-0V@xenbits.xenproject.org>
Date: Tue, 15 Sep 2026 16:11:52 +0000

commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:55:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:55:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427258.1649887 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ajn-0006JU-Fo; Mon, 21 Sep 2026 09:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427258.1649887; Mon, 21 Sep 2026 09:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ajn-0006JM-DL; Mon, 21 Sep 2026 09:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1427258;
 Mon, 21 Sep 2026 09:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8ajm-0006JG-O9
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ajl-008t0m-2i
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ajm-007eZN-0R
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VgSlOX15UW7NwZxHjHRZ+ZdHv078wnEpqat1PlY6h+U=; b=fA7QlOpdH/f5/RyF2fYQ+8ZjQ4
	YAh6jlLXgrBf07NIg0pBymOSgcw7ABCAVI4w0f2epD3JJI9HbfqmBh+swzxjW5z70jelSV6BwyxA0
	LYf94H9SNNS/U8IlHGhItWz73R30addhMk4gSZYB4mBxGvkf8FBHkezf3AhYj2YO0LhE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/sched: core: skip missing vcpu slots in sched_move_domain()
Message-Id: <E1x8ajm-007eZN-0R@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:55:02 +0000

commit 4835c078e5cf52fbcf842f4e8a2e61808b8ff869
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 09:54:12 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:54:12 2026 +0200

    xen/sched: core: skip missing vcpu slots in sched_move_domain()
    
    sched_move_domain() derives the number of units to rebuild from
    d->max_vcpus, which is fixed at domain creation and never rolled
    back if vcpu_create() fails partway through building a domain. So
    d->vcpu[i] can be NULL for some i even though max_vcpus still
    counts it - this happens if sched_alloc_udata() returns NULL.
    
    The per-unit loop doesn't check for this: it sets
    unit->vcpu_list = d->vcpu[unit_id] (NULL) and hands that broken
    unit straight to the destination scheduler's alloc_udata(),
    which assumes vcpu_list is always valid and crashes Xen when
    it is not.
    
    Reproduced by building a domain in a non-default cpupool where
    vcpu creation fails partway through, then destroying it.
    domain_kill() moves the domain back to the default cpupool via
    sched_move_domain() before actually destroying it, crashing
    inside the destination scheduler's alloc_udata() (seen in
    Credit2's csched2_alloc_udata() -> is_idle_unit() -> NULL deref).
    
    Before building a unit in sched_move_domain(), check whether all
    vpcu slots belonging to that unit are populated. If any of its
    vpcus is missing:
     - For a dying domain, skip the unit allocation.
     - For an active domain, abort the move and return -EINVAL to
       prevent running with dropped vCPUs.
    
    Fixes: 70fadc41635b ("xen/cpupool: support moving domain between cpupools with different granularity")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/core.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index ee24cc28f6..17e7f52169 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -745,6 +745,38 @@ int sched_move_domain(struct domain *d, struct cpupool *c)
 
     for ( unit_idx = 0; unit_idx < n_units; unit_idx++ )
     {
+        /*
+         * A vcpu slot can be missing if creation failed partway
+         * through. A dying domain is being torn down regardless, so
+         * skip the unit -- but a domain that isn't dying still needs
+         * every vcpu it has schedulable, so fail instead of silently
+         * dropping some of them.
+         */
+        bool vcpu_failed = false;
+
+        for ( unsigned int i = 0;
+              i < gran && unit_idx * gran + i < d->max_vcpus; i++ )
+        {
+            if ( !d->vcpu[unit_idx * gran + i] )
+            {
+                vcpu_failed = true;
+                break;
+            }
+        }
+
+        if ( vcpu_failed )
+        {
+            if ( !d->is_dying )
+            {
+                sched_move_domain_cleanup(c->sched, new_units, domdata);
+                rcu_read_unlock(&sched_res_rculock);
+
+                return -EINVAL;
+            }
+
+            continue;
+        }
+
         unit = sched_alloc_unit_mem();
         if ( unit )
         {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427259.1649892 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ajx-0006LD-HC; Mon, 21 Sep 2026 09:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427259.1649892; Mon, 21 Sep 2026 09:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ajx-0006L5-Ee; Mon, 21 Sep 2026 09:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1427259;
 Mon, 21 Sep 2026 09:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8ajw-0006Kx-Aq
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ajv-008t2f-39
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ajw-007feb-0p
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=BaRJ4hL0aIFrg7kAd73H176NZv6QU0SNs/apaqJf9Xk=; b=UDw/wPHFkpHWTpy4Jaunb2F4/3
	NEzPM0A0+zAsXsloazL5cQrj8qVvHZTFCU37KqtRgi2DRQgzmm87fWSJKd5+k1mvhYXdnHRkV46BB
	xPZW6fNhRATmdXfV88BBm2Sc7rUAvlNLaxuBKchnyXC4EBmwOjA9lu1W34dWk9Ob3uY4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86: always park offline CPUs
Message-Id: <E1x8ajw-007feb-0p@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:55:12 +0000

commit b0597289ebf89cda98d57f80014c633b9be18140
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 09:57:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:57:22 2026 +0200

    x86: always park offline CPUs
    
    While on AMD (or Hygon) CPUs the situation isn't as bad wrt broadcasting
    of #MC, some "multicast" can still happen. Therefore the reasoning to park
    CPUs rather than fully offlining them applies everywhere.
    
    Don't retain the dependency on the "mce=" cmdline option either: That
    option may best be dropped as well, as not enabling MCE will result in a
    shutdown when #MC would otherwise be raised.
    
    Drop the global variable, using a #define (just like common code does)
    instead. Outside of common code, simplify expressions / code accordingly.
    (In common code we still have to cater for x86 wanting it different from
    everyone else.)
    
    Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/acpi/cpu_idle.c      | 4 ++--
 xen/arch/x86/cpu/common.c         | 3 ---
 xen/arch/x86/cpu/mcheck/mce.c     | 9 +--------
 xen/arch/x86/genapic/x2apic.c     | 6 +-----
 xen/arch/x86/include/asm/percpu.h | 2 +-
 xen/arch/x86/include/asm/smp.h    | 6 ------
 xen/arch/x86/mpparse.c            | 8 ++------
 xen/arch/x86/setup.c              | 3 +--
 xen/arch/x86/smp.c                | 4 +---
 xen/arch/x86/smpboot.c            | 4 +---
 xen/include/xen/percpu.h          | 2 +-
 11 files changed, 11 insertions(+), 40 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 1a749fabd2..56b22a2ff3 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -436,7 +436,7 @@ static void cf_check dump_cx(unsigned char key)
 
         if ( cpu_online(cpu) )
             print_acpi_power(cpu, power);
-        else if ( park_offline_cpus )
+        else
             printk("CPU%u parked in state %u (C%u)\n", cpu,
                    power->last_state ? power->last_state->idx : 1,
                    power->last_state ? power->last_state->type : 1);
@@ -1360,7 +1360,7 @@ long set_cx_pminfo(uint32_t acpi_id, struct xen_processor_power *power)
          * If we've just learned of more available C states, wake the CPU if
          * it's parked, so it can go back to sleep in perhaps a deeper state.
          */
-        if ( park_offline_cpus && apic_id != BAD_APICID )
+        if ( apic_id != BAD_APICID )
         {
             unsigned long flags;
 
diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index d045ed6b41..43785d19cc 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -443,9 +443,6 @@ void __init early_cpu_init(bool verbose)
 	 * here.
 	 */
 
-	if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
-		park_offline_cpus = opt_mce;
-
 	/*
 	 * If nominal freq isn't available, use highest, thus causing NOW()
 	 * output to move more slowly.  See preset_tsc_scale().
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index 64fa66f026..1888f22d15 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -716,15 +716,8 @@ static int cf_check cpu_callback(
         rc = cpu_bank_alloc(cpu);
         break;
 
-    case CPU_UP_CANCELED:
-    case CPU_DEAD:
-        if ( !park_offline_cpus )
-            cpu_bank_free(cpu);
-        break;
-
     case CPU_REMOVE:
-        if ( park_offline_cpus )
-            cpu_bank_free(cpu);
+        cpu_bank_free(cpu);
         break;
     }
 
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index 5f2765cf14..ca88593d0f 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -181,12 +181,8 @@ static int cf_check update_clusterinfo(
              !cond_alloc_cpumask_var(&per_cpu(scratch_mask, cpu)) )
             err = -ENOMEM;
         break;
-    case CPU_UP_CANCELED:
-    case CPU_DEAD:
+
     case CPU_REMOVE:
-        if ( park_offline_cpus == (action != CPU_REMOVE) ||
-             system_state == SYS_STATE_suspend )
-            break;
         if ( per_cpu(cluster_cpus, cpu) )
         {
             cpumask_clear_cpu(cpu, per_cpu(cluster_cpus, cpu));
diff --git a/xen/arch/x86/include/asm/percpu.h b/xen/arch/x86/include/asm/percpu.h
index 34f589f990..fe3df03c4c 100644
--- a/xen/arch/x86/include/asm/percpu.h
+++ b/xen/arch/x86/include/asm/percpu.h
@@ -1,7 +1,7 @@
 #ifndef __X86_PERCPU_H__
 #define __X86_PERCPU_H__
 
-#define PARK_OFFLINE_CPUS_VAR
+#define park_offline_cpus true
 
 /*
  * Force uses of per_cpu() with an invalid area to attempt to access the
diff --git a/xen/arch/x86/include/asm/smp.h b/xen/arch/x86/include/asm/smp.h
index 3f16e62696..572b39b01c 100644
--- a/xen/arch/x86/include/asm/smp.h
+++ b/xen/arch/x86/include/asm/smp.h
@@ -25,12 +25,6 @@ DECLARE_PER_CPU(cpumask_var_t, scratch_cpumask);
 DECLARE_PER_CPU(cpumask_var_t, hpet_scratch_cpumask);
 DECLARE_PER_CPU(cpumask_var_t, send_ipi_cpumask);
 
-/*
- * Do we, for platform reasons, need to actually keep CPUs online when we
- * would otherwise prefer them to be off?
- */
-extern bool park_offline_cpus;
-
 void smp_send_nmi_allbutself(void);
 
 void send_IPI_mask(const cpumask_t *mask, int vector);
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index 1b41aa573f..3cea519152 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -80,16 +80,12 @@ void __init set_nr_cpu_ids(unsigned int max_cpus)
 	printk(XENLOG_INFO "SMP: Allowing %u CPUs (%d hotplug CPUs)\n",
 	       max_cpus, max_t(int, max_cpus - num_processors, 0));
 
-	if (!park_offline_cpus)
-		tot_cpus = max_cpus;
 	nr_cpu_ids = min(tot_cpus, NR_CPUS + 0u);
 	if (nr_cpu_ids < num_processors)
 	{
 		unaccounted_cpus = true;
-		if (park_offline_cpus)
-			printk(XENLOG_WARNING
-			       "SMP: Cannot bring up %u further CPUs\n",
-			       num_processors - nr_cpu_ids);
+		printk(XENLOG_WARNING "SMP: Cannot bring up %u further CPUs\n",
+		       num_processors - nr_cpu_ids);
 	}
 
 #ifndef nr_cpumask_bits
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 7d71fea6c0..a636e3205c 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -2144,8 +2144,7 @@ void asmlinkage __init noreturn __start_xen(void)
             /* Set up node_to_cpumask based on cpu_to_node[]. */
             numa_add_cpu(i);
 
-            if ( (park_offline_cpus || num_online_cpus() < max_cpus) &&
-                 !cpu_online(i) )
+            if ( !cpu_online(i) )
             {
                 ret = cpu_up(i);
                 if ( ret != 0 )
diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c
index 7936294f5f..ae4e5a66d7 100644
--- a/xen/arch/x86/smp.c
+++ b/xen/arch/x86/smp.c
@@ -92,9 +92,7 @@ void send_IPI_mask(const cpumask_t *mask, int vector)
     if ( system_state > SYS_STATE_smp_boot &&
          !unaccounted_cpus && !disabled_cpus && !cpu_in_hotplug_context() &&
          /* NB: get_cpu_maps lock requires enabled interrupts. */
-         local_irq_is_enabled() && (cpus_locked = get_cpu_maps()) &&
-         (park_offline_cpus ||
-          cpumask_equal(&cpu_online_map, &cpu_present_map)) )
+         local_irq_is_enabled() && (cpus_locked = get_cpu_maps()) )
         cpumask_or(scratch, mask, cpumask_of(smp_processor_id()));
     else
     {
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index cede2b886f..fb73989232 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -67,8 +67,6 @@ DEFINE_PER_CPU_READ_MOSTLY(struct stubs, stubs);
 cpumask_t cpu_online_map __read_mostly;
 EXPORT_SYMBOL(cpu_online_map);
 
-bool __read_mostly park_offline_cpus;
-
 unsigned int __read_mostly nr_sockets;
 cpumask_t **__read_mostly socket_cpumask;
 static cpumask_t *secondary_socket_cpumask;
@@ -1151,7 +1149,7 @@ static int cf_check cpu_smpboot_callback(
         break;
     case CPU_UP_CANCELED:
     case CPU_DEAD:
-        cpu_smpboot_free(cpu, !park_offline_cpus);
+        cpu_smpboot_free(cpu, false);
         break;
     case CPU_REMOVE:
         cpu_smpboot_free(cpu, true);
diff --git a/xen/include/xen/percpu.h b/xen/include/xen/percpu.h
index d324671b5b..88f332caab 100644
--- a/xen/include/xen/percpu.h
+++ b/xen/include/xen/percpu.h
@@ -36,7 +36,7 @@
 #include <xen/types.h>
 #include <asm/current.h>
 
-#ifndef PARK_OFFLINE_CPUS_VAR
+#if !defined(PARK_OFFLINE_CPUS_VAR) && !defined(park_offline_cpus)
 /*
  * Do we, for platform reasons, need to actually keep CPUs online when we
  * would otherwise prefer them to be off?
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427260.1649896 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ak7-0006ND-IY; Mon, 21 Sep 2026 09:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427260.1649896; Mon, 21 Sep 2026 09:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ak7-0006N5-G2; Mon, 21 Sep 2026 09:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1427260;
 Mon, 21 Sep 2026 09:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8ak6-0006Mx-Dm
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ak6-008t2o-0F
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ak6-007gdC-1B
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=E/sYv6q2vafNnpyoDi3Jd0SyjOkJH1IgQNQ6Poa5h7s=; b=G0cLbiskLRhjJ7GUpvI/0AIm9P
	Thlc02puGmA7127kSYbVtzHar9XRTOTPF4N5kvtyuy+A4hMBi0lvBuVVGEnCxEloDeury+EPYjEnL
	leMEcF6drWAZg92aHmpm6eiTJLdHQsMHOajZprfqubNW0E6zxUa0JXcb+1yIvDm+kUWU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/domain: address Misra rule 11.1 violation in reset_stack_and_call_ind()
Message-Id: <E1x8ak6-007gdC-1B@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:55:22 +0000

commit 9fd71d225729fd957bdf9e2c28d5e5030de85fe9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 09:58:31 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:58:31 2026 +0200

    x86/domain: address Misra rule 11.1 violation in reset_stack_and_call_ind()
    
    Eclair dislikes both sides of the comparison to differ in noreturn
    attributes, thus deeming this a violation of "Conversions shall not be
    performed between a pointer to a function and any other type". Since gcc
    doesn't permit use of "noreturn" types used in a typecast, resort to
    typeof().
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/include/asm/current.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/current.h b/xen/arch/x86/include/asm/current.h
index 6139980ab1..fe9a86a3f7 100644
--- a/xen/arch/x86/include/asm/current.h
+++ b/xen/arch/x86/include/asm/current.h
@@ -208,7 +208,7 @@ unsigned long get_stack_dump_bottom (unsigned long sp);
 /* The constraint may only specify non-call-clobbered registers. */
 #define reset_stack_and_call_ind(fn)                                    \
     ({                                                                  \
-        (void)((fn) == (void (*)(void))NULL);                           \
+        (void)((fn) == (typeof(dom_xen->arch.ctxt_switch->tail))NULL);  \
         switch_stack_and_jump(fn, "INDIRECT_CALL %", "b");              \
     })
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427261.1649900 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akH-0006P5-K0; Mon, 21 Sep 2026 09:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427261.1649900; Mon, 21 Sep 2026 09:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akH-0006Ox-HN; Mon, 21 Sep 2026 09:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1427261;
 Mon, 21 Sep 2026 09:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8akG-0006Oo-Go
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8akG-008t2s-0X
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8akG-007hfu-1T
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=1lDGQnHdecFn1hEDB84TNTd1K5De0TBTJh17giZbae0=; b=iuEY07PKSZwuzwGGRfvCuQpz9N
	ooYPCzY2i5xNh95qQHs03oBVD3IMlmaUsOSqBrYNZPgGaFPN2fJPchbFB/woD9sHgmiF86bVwv/4b
	MuOIc5Z9NsI1He4DriqN3+UqHSOS0UAy+dXc9SSmg4hMTB5yNnffgOQm8YQ9OpWcU65Y=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Eclair: relax long <-> function-pointer conversion deviation
Message-Id: <E1x8akG-007hfu-1T@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:55:32 +0000

commit 68c3f7fb3a840a0290ac1be76cb265bc8e7c6363
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 09:59:08 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:59:08 2026 +0200

    Eclair: relax long <-> function-pointer conversion deviation
    
    What is true for unsigned long is also true for plain/signed long, thus
    also taking care of two instances of __x86_return_thunk() being cast to
    long.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 8 ++++----
 docs/misra/rules.rst                             | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index c087032293..670d3693d6 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -368,17 +368,17 @@ constant expressions are required.\""
 # Series 11
 #
 
--doc_begin="The conversion from a function pointer to unsigned long or (void *) does not lose any information, provided that the target type has enough bits to store it."
+-doc_begin="The conversion from a function pointer to [unsigned] long or (void *) does not lose any information, provided that the target type has enough bits to store it."
 -config=MC3A2.R11.1,casts+={safe,
   "from(type(canonical(__function_pointer_types)))
-   &&to(type(canonical(builtin(unsigned long)||pointer(builtin(void)))))
+   &&to(type(canonical(builtin(long||unsigned long)||pointer(builtin(void)))))
    &&relation(definitely_preserves_value)"
 }
 -doc_end
 
--doc_begin="Conversion from unsigned long or (void *) to a function pointer can restore full information, provided that the source type has enough bits to restore it."
+-doc_begin="Conversion from [unsigned] long or (void *) to a function pointer can restore full information, provided that the source type has enough bits to restore it."
 -config=MC3A2.R11.1,casts+={safe,
-  "from(type(canonical(builtin(unsigned long)||pointer(builtin(void)))))
+  "from(type(canonical(builtin(long||unsigned long)||pointer(builtin(void)))))
    &&to(type(canonical(__function_pointer_types)))
    &&relation(definitely_preserves_value)"
 }
diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index b174add811..c9bbab6c08 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -432,8 +432,8 @@ maintainers if you want to suggest a change.
      - All conversions to integer types are permitted if the destination
        type has enough bits to hold the entire value. Conversions to bool
        and void* are permitted. Conversions from 'void noreturn (*)(...)'
-       to 'void (*)(...)' are permitted. Conversions from unsigned long or
-       '(void *)' to a function pointer are permitted.
+       to 'void (*)(...)' are permitted. Conversions from [unsigned] long
+       or '(void *)' to a function pointer are permitted.
        Example::
 
            unsigned long func_addr = (unsigned long)&some_function;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:55:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:55:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427262.1649904 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akR-0006RD-LS; Mon, 21 Sep 2026 09:55:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427262.1649904; Mon, 21 Sep 2026 09:55:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akR-0006R5-Ih; Mon, 21 Sep 2026 09:55:43 +0000
Received: by outflank-mailman (input) for mailman id 1427262;
 Mon, 21 Sep 2026 09:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8akQ-0006Qz-L1
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8akQ-008t3H-0u
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8akQ-007iTq-1o
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=U3Hf82AVsjMoMGKqj9D/zQFHxF8PLrXchOFrLGK/JBI=; b=btOjDUmc169b13zxeUsqsKT57W
	wq8SbW7lBlIVlMc3PNAbhZu0znI739FsMTznnEXTQ2o3zstCn0ugCU1HXUeTHI52UTNrFxQtTaii7
	2TIyYldRz8jmFCbHDfIRzYDT1YSC2LAk6KCvDuleq1dXfff80S1M3eN9GonIl7rGElD0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen: introduce CONFIG_HAS_SHARED_INFO for archs without a shared page
Message-Id: <E1x8akQ-007iTq-1o@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:55:42 +0000

commit 31fb44f8c02019f3a44e7ef6df0fbe0f2bce2ca3
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:19 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:05:20 2026 +0200

    xen: introduce CONFIG_HAS_SHARED_INFO for archs without a shared page
    
    On architectures that run guests in dom0less mode without the PV ABI
    (currently RISC-V), no shared_info page is allocated and d->shared_info
    remains NULL throughout the domain lifetime.  Several places in common
    code access d->shared_info through the shared_info() macro or directly,
    causing UBSAN null-pointer errors on such architectures.
    
    Rather than adding runtime NULL guards that are logically unreachable
    on x86 and Arm (where shared_info is always allocated), introduce a new
    Kconfig symbol CONFIG_HAS_SHARED_INFO selected by x86 and Arm.
    
    On !HAS_SHARED_INFO the shared_info() macro expands to a dereference
    of shared_info_absent, an extern pointer that is declared but
    intentionally never defined.  Any use of shared_info() that is not
    dead-code-eliminated will therefore cause a link-time failure, making
    missed guards impossible to overlook.
    
    The 2L event-channel ops call shared_info() and must not be compiled on
    architectures without a shared_info page, so event_2l.o is gated on
    CONFIG_HAS_SHARED_INFO.  On such architectures evtchn_init() installs the
    FIFO ops as a placeholder instead, so that a later guest opt-in to the
    FIFO ABI via EVTCHNOP_init_control has no special-casing to do; if FIFO
    support itself is also unavailable (!CONFIG_EVTCHN_FIFO), a dedicated
    no-op evtchn_port_ops_none table is installed instead, so that
    d->evtchn_port_ops is never NULL.  evtchn_fifo_word_from_port() is
    guarded against uninitialised d->evtchn_fifo so the FIFO ops are safe
    before evtchn_fifo_init_control() is called by the guest.
    
    With CONFIG_HAS_SHARED_INFO=n all vCPUs fall back to the global
    dummy_vcpu_info, so writes through vcpu_info() could leak data between
    vCPUs. Reviewing the write paths in common code: the write in
    map_guest_area() stores the constant ~0 so nothing serious would happen
    if it were leaked; the event_2l.c paths are not compiled on
    !HAS_SHARED_INFO, as event_2l.o is gated on CONFIG_HAS_SHARED_INFO; the
    write in vcpu_info_populate() targets the new mapping buffer, not
    dummy_vcpu_info.
    
    Outside common code, the remaining writes are x86 PV-specific, for which
    CONFIG_HAS_SHARED_INFO=y. No code changes are needed.
    
    Finally, struct domain's shared_info field itself is gated on
    CONFIG_HAS_SHARED_INFO, as it would otherwise be a permanently NULL
    pointer: every user of it is either arch code for an architecture that
    selects HAS_SHARED_INFO, or common code already guarded by the same
    Kconfig symbol.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Michal Orzel <michal.orzel@amd.com> #Arm
---
 xen/arch/arm/Kconfig       |  1 +
 xen/arch/x86/Kconfig       |  1 +
 xen/common/Kconfig         |  3 +++
 xen/common/Makefile        |  2 +-
 xen/common/domain.c        |  6 ++---
 xen/common/domctl.c        |  4 ++++
 xen/common/event_channel.c | 55 +++++++++++++++++++++++++++++++++++++++++++---
 xen/common/event_channel.h |  6 +++++
 xen/common/event_fifo.c    | 18 ++++++++++++++-
 xen/common/time.c          |  2 ++
 xen/include/xen/event.h    |  2 +-
 xen/include/xen/sched.h    |  2 ++
 xen/include/xen/shared.h   |  6 +++++
 xen/include/xen/time.h     |  5 +++++
 14 files changed, 104 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 843a43897e..d748404e82 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -20,6 +20,7 @@ config ARM
 	select HAS_DEVICE_TREE_DISCOVERY
 	select HAS_DOM0LESS
 	select HAS_GRANT_CACHE_FLUSH if GRANT_TABLE
+	select HAS_SHARED_INFO
 	select HAS_STACK_PROTECTOR
 	select HAS_STATIC_MEMORY
 	select HAS_UBSAN
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 3ce0774b8d..e5535ac484 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -29,6 +29,7 @@ config X86
 	select HAS_PCI_MSI
 	select HAS_PIRQ
 	select HAS_SCHED_GRANULARITY
+	select HAS_SHARED_INFO
 	imply HAS_SOFT_RESET
 	select HAS_UBSAN
 	select HAS_VMAP
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index da80fdba84..5b289e444f 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -158,6 +158,9 @@ config HAS_PMAP
 config HAS_SCHED_GRANULARITY
 	bool
 
+config HAS_SHARED_INFO
+	bool
+
 config HAS_STATIC_MEMORY
 	bool
 
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 6018e25614..f69d47d189 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_DEVICE_TREE_PARSE) += device-tree/
 obj-$(CONFIG_IOREQ_SERVER) += dm.o
 obj-y += domain.o
 obj-y += domid.o
-obj-y += event_2l.o
+obj-$(CONFIG_HAS_SHARED_INFO) += event_2l.o
 obj-y += event_channel.o
 obj-$(CONFIG_EVTCHN_FIFO) += event_fifo.o
 obj-$(CONFIG_GRANT_TABLE) += grant_table.o
diff --git a/xen/common/domain.c b/xen/common/domain.c
index e16f1ac383..6b52713518 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -316,9 +316,9 @@ void vcpu_info_reset(struct vcpu *v)
     struct domain *d = v->domain;
 
     v->vcpu_info_area.map =
-        ((v->vcpu_id < XEN_LEGACY_MAX_VCPUS)
-         ? (vcpu_info_t *)&shared_info(d, vcpu_info[v->vcpu_id])
-         : &dummy_vcpu_info);
+        IS_ENABLED(CONFIG_HAS_SHARED_INFO) && v->vcpu_id < XEN_LEGACY_MAX_VCPUS
+        ? (vcpu_info_t *)&shared_info(d, vcpu_info[v->vcpu_id])
+        : &dummy_vcpu_info;
 }
 
 static struct domain *alloc_domain_struct(void)
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index a6210db4fb..83405a766a 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -102,9 +102,13 @@ void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info)
 #ifdef CONFIG_MEM_PAGING
     info->paged_pages       = atomic_read(&d->paged_pages);
 #endif
+#ifdef CONFIG_HAS_SHARED_INFO
     info->shared_info_frame =
         gfn_x(mfn_to_gfn(d, _mfn(virt_to_mfn(d->shared_info))));
     BUG_ON(SHARED_M2P(info->shared_info_frame));
+#else
+    info->shared_info_frame = ~0;
+#endif
 
     info->cpupool = cpupool_get_id(d);
 
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index a7f9cc5fe0..bd03e094d0 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -40,6 +40,54 @@
 
 #define consumer_is_xen(e) (!!(e)->xen_consumer)
 
+#if !defined(CONFIG_HAS_SHARED_INFO) && !defined(CONFIG_EVTCHN_FIFO)
+/*
+ * Placeholder ops for domains with neither a shared_info page nor a FIFO
+ * control block. Such a domain has no ABI to record event state in, so these
+ * are reachable whenever an event is delivered to (or queried on) one of its
+ * ports; they just discard/no-op it. They exist to keep d->evtchn_port_ops
+ * non-NULL.
+ */
+static void cf_check evtchn_none_set_pending(
+    struct vcpu *v, struct evtchn *evtchn) {}
+static void cf_check evtchn_none_noop(
+    struct domain *d, struct evtchn *evtchn) {}
+static bool cf_check evtchn_none_false(
+    const struct domain *d, const struct evtchn *evtchn) { return false; }
+static void cf_check evtchn_none_print_state(
+    struct domain *d, const struct evtchn *evtchn) {}
+
+static const struct evtchn_port_ops evtchn_port_ops_none = {
+    .set_pending   = evtchn_none_set_pending,
+    .clear_pending = evtchn_none_noop,
+    .unmask        = evtchn_none_noop,
+    .is_pending    = evtchn_none_false,
+    .is_masked     = evtchn_none_false,
+    .print_state   = evtchn_none_print_state,
+};
+
+static void evtchn_none_init(struct domain *d)
+{
+    d->evtchn_port_ops = &evtchn_port_ops_none;
+}
+#else /* CONFIG_HAS_SHARED_INFO || CONFIG_EVTCHN_FIFO */
+/*
+ * Declaration only; the call in evtchn_preinit() is DCE'd unless both
+ * configs are off.
+ */
+void evtchn_none_init(struct domain *d);
+#endif /* !CONFIG_HAS_SHARED_INFO && !CONFIG_EVTCHN_FIFO */
+
+static void evtchn_preinit(struct domain *d)
+{
+    if ( IS_ENABLED(CONFIG_HAS_SHARED_INFO) )
+        evtchn_2l_init(d);
+    else if ( IS_ENABLED(CONFIG_EVTCHN_FIFO) )
+        evtchn_fifo_init_ops(d);
+    else
+        evtchn_none_init(d);
+}
+
 /*
  * Lock an event channel exclusively. This is allowed only when the channel is
  * free or unbound either when taking or when releasing the lock, as any
@@ -1324,9 +1372,9 @@ int evtchn_reset(struct domain *d, bool resuming)
         rc = -EAGAIN;
     else if ( d->evtchn_fifo )
     {
-        /* Switching back to 2-level ABI. */
+        /* Switching back to the default ABI. */
         evtchn_fifo_destroy(d);
-        evtchn_2l_init(d);
+        evtchn_preinit(d);
     }
 
     write_unlock(&d->event_lock);
@@ -1625,7 +1673,8 @@ void evtchn_check_pollers(struct domain *d, unsigned int port)
 
 int evtchn_init(struct domain *d, unsigned int max_port)
 {
-    evtchn_2l_init(d);
+    evtchn_preinit(d);
+
     d->max_evtchn_port = min_t(unsigned int, max_port, INT_MAX);
 
     d->evtchn = alloc_evtchn_bucket(d, 0);
diff --git a/xen/common/event_channel.h b/xen/common/event_channel.h
index dc94a43cc2..423c4ee77b 100644
--- a/xen/common/event_channel.h
+++ b/xen/common/event_channel.h
@@ -70,6 +70,12 @@ static inline void evtchn_fifo_destroy(struct domain *d)
 }
 #endif /* CONFIG_EVTCHN_FIFO */
 
+/*
+ * Declaration only when !CONFIG_EVTCHN_FIFO; the call in evtchn_preinit() is
+ * DCE'd in that case.
+ */
+void evtchn_fifo_init_ops(struct domain *d);
+
 #endif /* EVENT_CHANNEL_H */
 
 /*
diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index 611bf8a788..e4225b1b66 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -62,6 +62,9 @@ static inline event_word_t *evtchn_fifo_word_from_port(const struct domain *d,
      */
     smp_rmb();
 
+    if ( unlikely(!d->evtchn_fifo) )
+        return NULL;
+
     if ( unlikely(port >= d->evtchn_fifo->num_evtchns) )
         return NULL;
 
@@ -419,6 +422,18 @@ static const struct evtchn_port_ops evtchn_port_ops_fifo =
     .print_state   = evtchn_fifo_print_state,
 };
 
+/*
+ * evtchn_fifo_init_ops()'s only call site is the
+ * IS_ENABLED(CONFIG_EVTCHN_FIFO) branch of evtchn_preinit(), which is never
+ * reached on HAS_SHARED_INFO=y builds because of DCE.
+ */
+#ifndef CONFIG_HAS_SHARED_INFO
+void evtchn_fifo_init_ops(struct domain *d)
+{
+    d->evtchn_port_ops = &evtchn_port_ops_fifo;
+}
+#endif
+
 static int map_guest_page(struct domain *d, uint64_t gfn, void **virt)
 {
     struct page_info *p;
@@ -561,7 +576,8 @@ static void setup_ports(struct domain *d, unsigned int prev_evtchns)
 
         evtchn = evtchn_from_port(d, port);
 
-        if ( guest_test_bit(d, port, &shared_info(d, evtchn_pending)) )
+        if ( IS_ENABLED(CONFIG_HAS_SHARED_INFO) &&
+             guest_test_bit(d, port, &shared_info(d, evtchn_pending)) )
             evtchn->pending = true;
 
         evtchn_fifo_set_priority(d, evtchn, EVTCHN_FIFO_PRIORITY_DEFAULT);
diff --git a/xen/common/time.c b/xen/common/time.c
index 0ddf65448d..58d2b54a29 100644
--- a/xen/common/time.c
+++ b/xen/common/time.c
@@ -98,6 +98,7 @@ struct tm gmtime(unsigned long t)
     return tbuf;
 }
 
+#ifdef CONFIG_HAS_SHARED_INFO
 void update_domain_wallclock_time(struct domain *d)
 {
     uint32_t *wc_version;
@@ -126,6 +127,7 @@ void update_domain_wallclock_time(struct domain *d)
 
     spin_unlock(&wc_lock);
 }
+#endif /* CONFIG_HAS_SHARED_INFO */
 
 /* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */
 void do_settime(u64 secs, unsigned int nsecs, u64 system_time_base)
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 930190054c..595dedf079 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -211,7 +211,7 @@ static bool evtchn_usable(const struct evtchn *evtchn)
 
 void evtchn_check_pollers(struct domain *d, unsigned int port);
 
-/* Close all event channels and reset to 2-level ABI. */
+/* Close all event channels and reset to the default ABI. */
 int evtchn_reset(struct domain *d, bool resuming);
 
 /*
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index e352e2b38e..73c54794ac 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -404,7 +404,9 @@ struct domain
 
     struct vcpu    **vcpu;
 
+#ifdef CONFIG_HAS_SHARED_INFO
     shared_info_t   *shared_info;     /* shared data area */
+#endif
 
     rcu_read_lock_t  rcu_lock;
 
diff --git a/xen/include/xen/shared.h b/xen/include/xen/shared.h
index 5b71342cab..1589e8793f 100644
--- a/xen/include/xen/shared.h
+++ b/xen/include/xen/shared.h
@@ -43,7 +43,13 @@ typedef struct vcpu_info vcpu_info_t;
 
 extern vcpu_info_t dummy_vcpu_info;
 
+#ifdef CONFIG_HAS_SHARED_INFO
 #define shared_info(d, field)      __shared_info(d, (d)->shared_info, field)
+#else
+extern struct shared_info *shared_info_absent;
+#define shared_info(d, field) (((void)(d), shared_info_absent)->field)
+#endif /* CONFIG_HAS_SHARED_INFO */
+
 #define vcpu_info(v, field)        \
         __vcpu_info(v, (vcpu_info_t *)(v)->vcpu_info_area.map, field)
 
diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h
index 4db24617a9..09da150c2a 100644
--- a/xen/include/xen/time.h
+++ b/xen/include/xen/time.h
@@ -72,7 +72,12 @@ extern bool NOW_good;
 #define version_update_begin(v) (((v) + 1) | 1)
 #define version_update_end(v)   ((v) + 1)
 extern void update_vcpu_system_time(struct vcpu *v);
+
+#ifdef CONFIG_HAS_SHARED_INFO
 extern void update_domain_wallclock_time(struct domain *d);
+#else
+static inline void update_domain_wallclock_time(struct domain *d) {}
+#endif
 
 extern void do_settime(
     u64 secs, unsigned int nsecs, u64 system_time_base);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:55:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:55:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427263.1649909 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akb-0006Tn-OD; Mon, 21 Sep 2026 09:55:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427263.1649909; Mon, 21 Sep 2026 09:55:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akb-0006Tf-LL; Mon, 21 Sep 2026 09:55:53 +0000
Received: by outflank-mailman (input) for mailman id 1427263;
 Mon, 21 Sep 2026 09:55:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8aka-0006TZ-ND
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:55:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8aka-008t3W-1B
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8aka-007jL5-29
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=fTYNw0YLfHb7+ob7LzldAPoBbToAOzFc06h4EhzIfqI=; b=ppPoHsD8/AtLCBiL+azHbS9ujW
	5r9xr5r5CcjGWNRjvDHroC6HrTpPeDEH3iuaimybaRqLCfGKpJ65RYwfSyAX+1thJNjBFZ096u2bT
	9iHPI1ztcM1eFcGZo8GEpviCGhIXngXjBiGA4pZQNf14pKhRBlXP9mCWXDo+ycZw1DqE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: Implement construct_domain()
Message-Id: <E1x8aka-007jL5-29@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:55:52 +0000

commit a83e5b41c4bae62fa21b4b6ffe69a2e5a7c40b5f
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:21 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:06:12 2026 +0200

    xen/riscv: Implement construct_domain()
    
    Implement construct_domain() function for RISC-V, which performs initial setup
    for the domain's first vCPU, loads the kernel, initrd, and device tree,
    and sets up guest CPU registers for boot.
    
    It also creates additional vCPUs up to max_vcpus and assigns the device tree
    address and boot cpuid in registers.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/Makefile       |  1 +
 xen/arch/riscv/domain-build.c | 50 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 4fcdcf9e24..2d24670dfc 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,6 +1,7 @@
 obj-y += aplic.o
 obj-y += cpufeature.o
 obj-y += domain.o
+obj-y += domain-build.init.o
 obj-$(CONFIG_DOM0LESS_BOOT) += dom0less-build.init.o
 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
 obj-y += entry.o
diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
new file mode 100644
index 0000000000..5f6f4b6248
--- /dev/null
+++ b/xen/arch/riscv/domain-build.c
@@ -0,0 +1,50 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <xen/fdt-domain-build.h>
+#include <xen/fdt-kernel.h>
+#include <xen/init.h>
+#include <xen/sched.h>
+
+#include <asm/current.h>
+#include <asm/guest_access.h>
+
+int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
+{
+    struct vcpu *v = d->vcpu[0];
+    struct cpu_user_regs *regs = vcpu_guest_cpu_user_regs(v);
+
+    BUG_ON(v->is_initialised);
+
+    /*
+     * At the moment *_load() don't return value and will just panic()
+     * inside.
+     * TODO: it will be good to change that.
+     */
+    kernel_load(kinfo);
+    initrd_load(kinfo, copy_to_guest_phys);
+    dtb_load(kinfo, copy_to_guest_phys);
+
+    regs->sepc = kinfo->entry;
+
+    /* Guest boot cpuid = 0 */
+    regs->a0 = 0;
+    regs->a1 = kinfo->dtb_paddr;
+
+    for ( unsigned int i = 1; i < d->max_vcpus; i++ )
+    {
+        const struct vcpu *tmp_v = vcpu_create(d, i);
+
+        if ( !tmp_v )
+        {
+            printk("Failed to allocate %pdv%u\n", d, i);
+            break;
+        }
+    }
+
+    domain_update_node_affinity(d);
+
+    v->is_initialised = true;
+    clear_bit(_VPF_down, &v->pause_flags);
+
+    return 0;
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:56:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:56:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427264.1649912 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akl-0006Vk-PP; Mon, 21 Sep 2026 09:56:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427264.1649912; Mon, 21 Sep 2026 09:56:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akl-0006Va-Mi; Mon, 21 Sep 2026 09:56:03 +0000
Received: by outflank-mailman (input) for mailman id 1427264;
 Mon, 21 Sep 2026 09:56:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8akk-0006VS-Q2
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:56:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8akk-008t3n-1S
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8akk-007k6Y-2P
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=y+OSSsFvOVHwlXupAAtCU9q1eySLIVGeL1VYdtZZ7B0=; b=TWOjQ9kaTKuL7HKhcjXodIA8nk
	JtZBxbXARELD0aq5lM6QJyf7JeJX4+3W55ZMndTb4qubH1EulD6sjze9UdniiSo6CvYDd0rb+aJIm
	nkHvdO6BaiAgLqk86EDxZjJ3B6esNJcHcmaXiym7QSWN9YdtC8dKY3RobdKgIbADu0B0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: introduce guest riscv,isa string
Message-Id: <E1x8akk-007k6Y-2P@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:56:02 +0000

commit 282bbc3cabf9cc26592044cc70acf2bd746f63d2
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:06:37 2026 +0200

    xen/riscv: introduce guest riscv,isa string
    
    Introduce build_guest_isa_str() to generate the riscv,isa string to be
    passed to the guest via the Device Tree riscv,isa property.
    
    Introduce the per-domain guest ISA bitmap, populated during domain
    creation by calling init_guest_isa().
    
    Introduce struct riscv_isa_ext_entry with a new guest_flags field
    to filter out ISA extensions that should not be exposed to guests:
    
    - f/d/q/v: FPU and vector context save/restore are not yet implemented
      for guests.
    - Z*inx are not exposed either: they aren't in riscv_isa_ext[], so they
      can never be set in riscv_isa and thus never reach a guest, and no
      current hardware/guest-OS advertises or expects them. Supporting them
      would be cheaper than F/D/Q (FP values stay in integer registers Xen
      already context-switches), but is left as future work.
    - h: Nested virtualisation is not supported.
    - sstc: Xen owns the supervisor timer; guests must use SBI.
    - svade: Xen manages hardware A/D bit updates in stage-2 page tables.
    - svpbmt: Page-based memory types are not yet wired up in stage-2 code.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/cpufeature.c             | 200 ++++++++++++++++++++++++++++----
 xen/arch/riscv/domain.c                 |   2 +
 xen/arch/riscv/include/asm/cpufeature.h |   5 +
 xen/arch/riscv/include/asm/domain.h     |   3 +
 4 files changed, 186 insertions(+), 24 deletions(-)

diff --git a/xen/arch/riscv/cpufeature.c b/xen/arch/riscv/cpufeature.c
index 92235fdfd5..aaf544d13f 100644
--- a/xen/arch/riscv/cpufeature.c
+++ b/xen/arch/riscv/cpufeature.c
@@ -14,7 +14,9 @@
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/sched.h>
 #include <xen/sections.h>
+#include <xen/xvmalloc.h>
 
 #include <asm/cpufeature.h>
 #include <asm/csr.h>
@@ -34,9 +36,64 @@ struct riscv_isa_ext_data {
     .name = #ext_name,                          \
 }
 
+/*
+ * Which guests an extension may be handed out to, by guest XLEN.
+ *
+ * These flags express Xen's policy, not the ISA's rules: extensions which
+ * are architecturally tied to one XLEN (Zilsd on RV32, say) need no special
+ * treatment here, as they can only ever appear in the "riscv,isa" of a host
+ * of that XLEN, and guest_isa is masked against the host ISA bitmap anyway.
+ * They are only of use for extensions Xen chooses not to expose to guests of
+ * a given width despite the hardware implementing them.
+ */
+#define RISCV_ISA_EXT_GUEST_NONE 0
+#define RISCV_ISA_EXT_GUEST_RV32 (1U << 0)
+#define RISCV_ISA_EXT_GUEST_RV64 (1U << 1)
+#define RISCV_ISA_EXT_GUEST_ANY  (RISCV_ISA_EXT_GUEST_RV32 | \
+                                  RISCV_ISA_EXT_GUEST_RV64)
+
+/*
+ * Guests are of the same width as Xen itself for the time being; once guest
+ * XLEN can differ from host XLEN (hstatus.VSXL), this becomes a per-domain
+ * property, just as guest_isa below does.
+ */
+#if defined(CONFIG_RISCV_32)
+#define RISCV_ISA_EXT_GUEST_XLEN RISCV_ISA_EXT_GUEST_RV32
+#elif defined(CONFIG_RISCV_64)
+#define RISCV_ISA_EXT_GUEST_XLEN RISCV_ISA_EXT_GUEST_RV64
+#else
+# error "Unsupported RISC-V bitness"
+#endif
+
+struct riscv_isa_ext_entry {
+    unsigned int id;
+    const char *name;
+    unsigned int guest_flags;
+};
+
+#define RISCV_ISA_EXT_ENTRY(ext_name, guest)        \
+{                                                   \
+    .id          = RISCV_ISA_EXT_ ## ext_name,      \
+    .name        = #ext_name,                       \
+    .guest_flags = RISCV_ISA_EXT_GUEST_ ## guest,   \
+}
+
 /* Host ISA bitmap */
 static __ro_after_init DECLARE_BITMAP(riscv_isa, RISCV_ISA_EXT_MAX);
 
+/*
+ * ISA bitmap handed out to every guest.
+ *
+ * All guests are given the same extensions for the time being, so this is
+ * computed once out of riscv_isa_ext[] and riscv_isa, rather than redoing
+ * the walk for every domain created.  Should per-domain ISA policy ever be
+ * introduced, this will need to become per-domain again.
+ */
+static __ro_after_init DECLARE_BITMAP(guest_isa, RISCV_ISA_EXT_MAX);
+
+/* "riscv,isa" string corresponding to guest_isa, shared by all domains. */
+static char *__ro_after_init guest_isa_str;
+
 static int __init dt_get_cpuid_from_node(const struct dt_device_node *cpu,
                                          unsigned long *dt_cpuid)
 {
@@ -120,29 +177,30 @@ static int __init dt_get_cpuid_from_node(const struct dt_device_node *cpu,
  * and strncmp() is used in match_isa_ext() to compare extension names instead
  * of strncasecmp().
  */
-const struct riscv_isa_ext_data __initconst riscv_isa_ext[] = {
-    RISCV_ISA_EXT_DATA(i),
-    RISCV_ISA_EXT_DATA(m),
-    RISCV_ISA_EXT_DATA(a),
-    RISCV_ISA_EXT_DATA(f),
-    RISCV_ISA_EXT_DATA(d),
-    RISCV_ISA_EXT_DATA(q),
-    RISCV_ISA_EXT_DATA(c),
-    RISCV_ISA_EXT_DATA(h),
-    RISCV_ISA_EXT_DATA(zicntr),
-    RISCV_ISA_EXT_DATA(zicsr),
-    RISCV_ISA_EXT_DATA(zifencei),
-    RISCV_ISA_EXT_DATA(zihintpause),
-    RISCV_ISA_EXT_DATA(zihpm),
-    RISCV_ISA_EXT_DATA(zba),
-    RISCV_ISA_EXT_DATA(zbb),
-    RISCV_ISA_EXT_DATA(zbs),
-    RISCV_ISA_EXT_DATA(smaia),
-    RISCV_ISA_EXT_DATA(smstateen),
-    RISCV_ISA_EXT_DATA(ssaia),
-    RISCV_ISA_EXT_DATA(sstc),
-    RISCV_ISA_EXT_DATA(svade),
-    RISCV_ISA_EXT_DATA(svpbmt),
+static const struct riscv_isa_ext_entry __initconstrel riscv_isa_ext[] = {
+    RISCV_ISA_EXT_ENTRY(i,              ANY),
+    RISCV_ISA_EXT_ENTRY(m,              ANY),
+    RISCV_ISA_EXT_ENTRY(a,              ANY),
+    RISCV_ISA_EXT_ENTRY(f,              NONE),
+    RISCV_ISA_EXT_ENTRY(d,              NONE),
+    RISCV_ISA_EXT_ENTRY(q,              NONE),
+    RISCV_ISA_EXT_ENTRY(c,              ANY),
+    RISCV_ISA_EXT_ENTRY(v,              NONE),
+    RISCV_ISA_EXT_ENTRY(h,              NONE),
+    RISCV_ISA_EXT_ENTRY(zicntr,         ANY),
+    RISCV_ISA_EXT_ENTRY(zicsr,          ANY),
+    RISCV_ISA_EXT_ENTRY(zifencei,       ANY),
+    RISCV_ISA_EXT_ENTRY(zihintpause,    ANY),
+    RISCV_ISA_EXT_ENTRY(zihpm,          ANY),
+    RISCV_ISA_EXT_ENTRY(zba,            ANY),
+    RISCV_ISA_EXT_ENTRY(zbb,            ANY),
+    RISCV_ISA_EXT_ENTRY(zbs,            ANY),
+    RISCV_ISA_EXT_ENTRY(smaia,          ANY),
+    RISCV_ISA_EXT_ENTRY(smstateen,      ANY),
+    RISCV_ISA_EXT_ENTRY(ssaia,          ANY),
+    RISCV_ISA_EXT_ENTRY(sstc,           NONE),
+    RISCV_ISA_EXT_ENTRY(svade,          NONE),
+    RISCV_ISA_EXT_ENTRY(svpbmt,         NONE),
 };
 
 static const struct riscv_isa_ext_data __initconst required_extensions[] = {
@@ -181,7 +239,7 @@ static void __init match_isa_ext(const char *name, const char *name_end,
 
     for ( unsigned int i = 0; i < riscv_isa_ext_count; i++ )
     {
-        const struct riscv_isa_ext_data *ext = &riscv_isa_ext[i];
+        const struct riscv_isa_ext_entry *ext = &riscv_isa_ext[i];
 
         /*
          * `ext->name` (according to initialization of riscv_isa_ext[]
@@ -480,6 +538,98 @@ bool riscv_isa_extension_available(const unsigned long *isa_bitmap,
     return test_bit(id, isa_bitmap);
 }
 
+static int __init build_guest_isa_str(char *buf, size_t size)
+{
+    char *p = buf;
+    size_t left = size;
+    int total;
+
+#if defined(CONFIG_RISCV_32)
+    total = snprintf(p, left, "rv32");
+#elif defined(CONFIG_RISCV_64)
+    total = snprintf(p, left, "rv64");
+#else
+#   error "Unsupported RISC-V bitness"
+#endif
+
+    if ( total < 0 )
+        return total;
+
+    if ( buf )
+    {
+        if ( (size_t)total >= left )
+            return -ENOSPC;
+
+        p += total;
+        left -= total;
+    }
+
+    for ( unsigned int i = 0; i < ARRAY_SIZE(riscv_isa_ext); i++ )
+    {
+        const struct riscv_isa_ext_entry *ext = &riscv_isa_ext[i];
+        int ret;
+
+        if ( !riscv_isa_extension_available(guest_isa, ext->id) )
+            continue;
+
+        ret = snprintf(p, left, "%s%s",
+                       ext->id >= RISCV_ISA_EXT_BASE ? "_" : "",
+                       ext->name);
+        if ( ret < 0 )
+            return ret;
+
+        total += ret;
+
+        if ( buf )
+        {
+            if ( (size_t)ret >= left )
+                return -ENOSPC;
+
+            p += ret;
+            left -= ret;
+        }
+    }
+
+    return total;
+}
+
+static void __init compute_guest_isa(void)
+{
+    int len;
+
+    for ( unsigned int i = 0; i < ARRAY_SIZE(riscv_isa_ext); i++ )
+    {
+        const struct riscv_isa_ext_entry *ext = &riscv_isa_ext[i];
+
+        if ( (ext->guest_flags & RISCV_ISA_EXT_GUEST_XLEN) &&
+             riscv_isa_extension_available(NULL, ext->id) )
+            __set_bit(ext->id, guest_isa);
+    }
+
+    /*
+     * All domains are given the same guest ISA, so the "riscv,isa" string
+     * is built only once here and then shared by all of them.
+     */
+    if ( (len = build_guest_isa_str(NULL, 0)) < 0 )
+        panic("Failed to calculate guest \"riscv,isa\" length: %d\n", len);
+
+    if ( !(guest_isa_str = xvmalloc_array(char, len + 1)) )
+        panic("Failed to allocate guest \"riscv,isa\" string\n");
+
+    if ( build_guest_isa_str(guest_isa_str, len + 1) != len )
+        panic("Failed to build guest \"riscv,isa\" string\n");
+}
+
+void init_guest_isa(struct domain *d)
+{
+    d->arch.isa = guest_isa;
+}
+
+const char *get_guest_isa_str(void)
+{
+    return guest_isa_str;
+}
+
 void __init riscv_fill_hwcap(void)
 {
     unsigned int i;
@@ -527,4 +677,6 @@ void __init riscv_fill_hwcap(void)
     if ( !all_extns_available )
         panic("Look why the extensions above are needed in "
               "https://xenbits.xenproject.org/docs/unstable/misc/riscv/booting.txt\n");
+
+    compute_guest_isa();
 }
diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c
index 2819ff4e7c..c993314759 100644
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -308,6 +308,8 @@ int arch_domain_create(struct domain *d,
     if ( is_idle_domain(d) )
         return 0;
 
+    init_guest_isa(d);
+
     if ( (rc = p2m_init(d, config)) != 0)
         goto fail;
 
diff --git a/xen/arch/riscv/include/asm/cpufeature.h b/xen/arch/riscv/include/asm/cpufeature.h
index 0c48d57a03..2973eb13a5 100644
--- a/xen/arch/riscv/include/asm/cpufeature.h
+++ b/xen/arch/riscv/include/asm/cpufeature.h
@@ -5,6 +5,7 @@
 #ifndef __ASSEMBLER__
 
 #include <xen/stdbool.h>
+#include <xen/types.h>
 
 /*
  * These macros represent the logical IDs of each multi-letter RISC-V ISA
@@ -44,7 +45,11 @@ enum riscv_isa_ext_id {
     RISCV_ISA_EXT_MAX
 };
 
+struct domain;
+
 void riscv_fill_hwcap(void);
+void init_guest_isa(struct domain *d);
+const char *get_guest_isa_str(void);
 
 bool riscv_isa_extension_available(const unsigned long *isa_bitmap,
                                    enum riscv_isa_ext_id id);
diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/asm/domain.h
index 6044ce0fee..8ae01a5e4d 100644
--- a/xen/arch/riscv/include/asm/domain.h
+++ b/xen/arch/riscv/include/asm/domain.h
@@ -7,6 +7,7 @@
 #include <xen/xmalloc.h>
 #include <public/hvm/params.h>
 
+#include <asm/cpufeature.h>
 #include <asm/guest-layout.h>
 #include <asm/p2m.h>
 #include <asm/vtimer.h>
@@ -94,6 +95,8 @@ struct arch_domain {
     struct p2m_domain p2m;
 
     struct paging_domain paging;
+
+    const unsigned long *isa;
 };
 
 #include <xen/sched.h>
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:56:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:56:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427265.1649916 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akv-0006Xg-Qz; Mon, 21 Sep 2026 09:56:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427265.1649916; Mon, 21 Sep 2026 09:56:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8akv-0006XY-O6; Mon, 21 Sep 2026 09:56:13 +0000
Received: by outflank-mailman (input) for mailman id 1427265;
 Mon, 21 Sep 2026 09:56:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8aku-0006XQ-SP
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:56:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8aku-008t45-1h
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8aku-007krG-2g
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=JS9syl4CvEcBswJja+HX7PoLHuJo2EFWoIHDTqeiDRE=; b=gmDSSZ/5RiWpANIG5b3kCXS+9j
	jAa8mcSTUjjWCVxt3p3/8zvjC/xxk7KcZ6iooVcQnh3LovvH7pOIfNxI/H9t0NFd4AZPkfWeA696I
	yRGd2eNGhjVS15oUUPpwwllaBUCxD9bev4rGe8QyqmP3gzIr6CmIxobMkpa17hzQxxyM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: implement make_cpus_node()
Message-Id: <E1x8aku-007krG-2g@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:56:12 +0000

commit 213ca210ffb58fb1ba6208177627db6bfbb3f4a2
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:23 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:06:57 2026 +0200

    xen/riscv: implement make_cpus_node()
    
    Implement make_cpus_node() to create cpus node for a guest domain.
    
    This function is going to be use by common dom0less code during
    construction domain.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/domain-build.c | 106 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
index 5f6f4b6248..1af4c48fb3 100644
--- a/xen/arch/riscv/domain-build.c
+++ b/xen/arch/riscv/domain-build.c
@@ -3,8 +3,10 @@
 #include <xen/fdt-domain-build.h>
 #include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 
+#include <asm/cpufeature.h>
 #include <asm/current.h>
 #include <asm/guest_access.h>
 
@@ -48,3 +50,107 @@ int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
 
     return 0;
 }
+
+int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
+{
+    int res;
+    const struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
+    uint32_t timebase_frequency;
+    bool frequency_valid;
+    void *fdt = kinfo->fdt;
+
+    dt_dprintk("Create cpus node\n");
+
+    if ( !cpus )
+    {
+        dprintk(XENLOG_ERR, "Missing /cpus node in the device tree?\n");
+        return -ENOENT;
+    }
+
+    frequency_valid = dt_property_read_u32(cpus, "timebase-frequency",
+                                           &timebase_frequency);
+
+    res = fdt_begin_node(fdt, "cpus");
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "#address-cells", 1);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "#size-cells", 0);
+    if ( res )
+        return res;
+
+    if ( frequency_valid )
+        res = fdt_property_cell(fdt, "timebase-frequency", timebase_frequency);
+
+    for ( unsigned int cpu = 0; cpu < d->max_vcpus; cpu++ )
+    {
+        char buf[64];
+
+        snprintf(buf, ARRAY_SIZE(buf), "cpu@%u", cpu);
+        res = fdt_begin_node(fdt, buf);
+        if ( res )
+            return res;
+
+        res = fdt_property_cell(fdt, "reg", cpu);
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "status", "okay");
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "compatible", "riscv");
+        if ( res )
+            return res;
+
+        BUILD_BUG_ON((sizeof("riscv,") +
+                      sizeof_field(struct gstage_mode_desc, name)) >= sizeof(buf));
+        snprintf(buf, ARRAY_SIZE(buf), "riscv,%s", max_gstage_mode->name);
+        res = fdt_property_string(fdt, "mmu-type", buf);
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "riscv,isa", get_guest_isa_str());
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "device_type", "cpu");
+        if ( res )
+            return res;
+
+        /* Start of interrupt-controller */
+        res = fdt_begin_node(fdt, "interrupt-controller");
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "compatible", "riscv,cpu-intc");
+        if ( res )
+            return res;
+
+        res = fdt_property_cell(fdt, "#interrupt-cells", 1);
+        if ( res )
+            return res;
+
+        res = fdt_property(fdt, "interrupt-controller", NULL, 0);
+        if ( res )
+            return res;
+
+        res = fdt_property_u32(fdt, "phandle", alloc_phandle(kinfo));
+        if ( res )
+            return res;
+
+        /* End of interrupt-controller */
+        res = fdt_end_node(fdt);
+        if ( res )
+            return res;
+
+        res = fdt_end_node(fdt);
+        if ( res )
+            return res;
+    }
+
+    return fdt_end_node(fdt);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:56:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:56:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427266.1649920 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8al5-0006Zd-SA; Mon, 21 Sep 2026 09:56:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427266.1649920; Mon, 21 Sep 2026 09:56:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8al5-0006ZV-PS; Mon, 21 Sep 2026 09:56:23 +0000
Received: by outflank-mailman (input) for mailman id 1427266;
 Mon, 21 Sep 2026 09:56:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8al4-0006ZP-VJ
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:56:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8al4-008t49-1z
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8al4-007lZm-2v
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=a8gGpG8zGWYG4PUg3e0OcKGUJYqCASbBEgt5LP+iby0=; b=dYDKdH75jJnn/jXiUnqh7HATzZ
	4xdzSh4yCs+Bc+4qHqUXRgJM4qA7RPhCJ6PTNPdz/v/Wg8WIOhoaKqLIkZJR3oPaXsvAK7oJo5LIS
	c1F53o1xKbp1pjuDM/9n/CD+DYS51EPeYnpugM3YzD2j7WWFRIL8X2wwUFFiAWk8++T4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: implement make_timer_node()
Message-Id: <E1x8al4-007lZm-2v@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:56:22 +0000

commit 913cf380cfc9b60086c0aca2c325311085c56a87
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:24 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:11 2026 +0200

    xen/riscv: implement make_timer_node()
    
    Generally, in DT for RISC-V there is a document which describes a timer
    node (riscv,timer.yaml or sifive,clint.yaml), but the Linux timer driver
    is declared with TIMER_OF_DECLARE(riscv_timer, "riscv", ...).
    It matches the CPU node (compatible "riscv"), not the timer node itself.
    It then calls of_find_compatible_node(NULL, NULL, "riscv,timer") only to
    read the optional riscv,timer-cannot-wake-cpu property.
    
    Since Xen does not care about that property for now, make_timer_node() is
    implemented to return 0, as no timer node needs to be created for RISC-V
    guests.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/domain-build.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
index 1af4c48fb3..d7613721db 100644
--- a/xen/arch/riscv/domain-build.c
+++ b/xen/arch/riscv/domain-build.c
@@ -3,6 +3,7 @@
 #include <xen/fdt-domain-build.h>
 #include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/fdt-kernel.h>
 #include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 
@@ -154,3 +155,10 @@ int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
 
     return fdt_end_node(fdt);
 }
+
+int __init make_timer_node(const struct kernel_info *kinfo)
+{
+    /* There is no need for timer node for RISC-V. */
+
+    return 0;
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:56:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:56:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427267.1649924 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alG-0006bd-TH; Mon, 21 Sep 2026 09:56:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427267.1649924; Mon, 21 Sep 2026 09:56:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alG-0006bV-Qm; Mon, 21 Sep 2026 09:56:34 +0000
Received: by outflank-mailman (input) for mailman id 1427267;
 Mon, 21 Sep 2026 09:56:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8alF-0006bL-1g
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:56:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alE-008t4D-2F
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alE-007mHQ-3D
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=FvhuyYIX8SnbrWfTvpyqc9vULqQXxT9MtPkV25Q58pc=; b=GImbrJwp9WhhDFL+NZkcgDcsXK
	zVMrj5UVvTvfgVKrnBYUMKEIAP6fQD41tSfgJSCQuL5y1S7wRoG8MjCVCvRST1w/WiR3mjSN8krZ4
	XbtFJms5XuR8XWN2WYtCTINW3WjnG/XzxhVmWZsSDIfPpjhHXLHFJa5sU6CDojix6ne0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: implement make_arch_nodes()
Message-Id: <E1x8alE-007mHQ-3D@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:56:32 +0000

commit 7e4be8d8ebde58b626303cd95fc3bef70fb4d473
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:25 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:24 2026 +0200

    xen/riscv: implement make_arch_nodes()
    
    No RISC-V-specific nodes need to be created at the moment,
    so make_arch_nodes() is implemented to simply return 0.
    
    It is placed in dom0less-build.c as make_arch_nodes() is
    only used in the dom0less code path. In the future, it will
    be extended to create an emulated UART node.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/dom0less-build.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/riscv/dom0less-build.c b/xen/arch/riscv/dom0less-build.c
index a683972e92..4cc00012aa 100644
--- a/xen/arch/riscv/dom0less-build.c
+++ b/xen/arch/riscv/dom0less-build.c
@@ -2,10 +2,18 @@
 
 #include <xen/bootfdt.h>
 #include <xen/device_tree.h>
+#include <xen/fdt-kernel.h>
 #include <xen/init.h>
 
 #include <asm/p2m.h>
 
+int __init make_arch_nodes(struct kernel_info *kinfo)
+{
+    /* No RISC-V specific nodes need to be made, at the moment. */
+
+    return 0;
+}
+
 int __init arch_parse_dom0less_node(struct dt_device_node *node,
                                     struct boot_domain *bd)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:56:45 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:56:45 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427268.1649930 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alR-0006eD-10; Mon, 21 Sep 2026 09:56:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427268.1649930; Mon, 21 Sep 2026 09:56:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alQ-0006e5-TW; Mon, 21 Sep 2026 09:56:44 +0000
Received: by outflank-mailman (input) for mailman id 1427268;
 Mon, 21 Sep 2026 09:56:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8alP-0006dz-4J
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:56:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alO-008t4c-2W
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alP-007n1d-0F
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=AXHcfQGX0UEDYQCLr6Esr1RC7gF9bXO4ZVymukfXPjQ=; b=MDICS3lJqJWtIbBw5Ut2hjiez8
	u0KMi8+pBtpIQIdL+jE6+OHuPQzgysG+yHZmEHtN8S3+z4rcYk8NDyEQOrL7X+YqR0ALfl2iz9iwd
	Q/L4RW9ptI06Af5J7SJDf1Pam6SGa55Tv1Lf9iuYr0su4DPDaEvedZHMQA2S86L8/AVM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: introduce init interrupt controller operations
Message-Id: <E1x8alP-007n1d-0F@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:56:43 +0000

commit c91771c85cec5f79a88cbc7912a27e9cb3507fdb
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:26 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:42 2026 +0200

    xen/riscv: introduce init interrupt controller operations
    
    Introduce intc_hw_init_ops structure to avoid risky mix of init
    function and non-init function.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/aplic.c            |  8 ++++++--
 xen/arch/riscv/include/asm/intc.h | 10 +++++++---
 xen/arch/riscv/intc.c             | 11 ++++++++---
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c
index 9f023db5d5..d08401db46 100644
--- a/xen/arch/riscv/aplic.c
+++ b/xen/arch/riscv/aplic.c
@@ -325,12 +325,16 @@ static const hw_irq_controller aplic_xen_irq_type = {
 
 static const struct intc_hw_operations aplic_ops = {
     .info                = &aplic_info,
-    .init                = aplic_init,
     .host_irq_type       = &aplic_xen_irq_type,
     .handle_interrupt    = aplic_handle_interrupt,
     .set_irq_type        = aplic_set_irq_type,
 };
 
+static const struct intc_hw_init_ops __initconstrel aplic_init_ops = {
+    .ops                 = &aplic_ops,
+    .init                = aplic_init,
+};
+
 static int cf_check aplic_irq_xlate(const uint32_t *intspec,
                                     unsigned int intsize,
                                     unsigned int *out_hwirq,
@@ -366,7 +370,7 @@ static int __init aplic_preinit(struct dt_device_node *node, const void *dat)
 
     dt_irq_xlate = aplic_irq_xlate;
 
-    register_intc_ops(&aplic_ops);
+    register_intc_ops(&aplic_init_ops);
 
     /* Enable supervisor external interrupt */
     csr_set(CSR_SIE, BIT(IRQ_S_EXT, UL));
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index 675f703ec9..d7b34fc15a 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -28,8 +28,6 @@ struct intc_info {
 struct intc_hw_operations {
     /* Hold intc hw information */
     const struct intc_info *info;
-    /* Initialize the intc and the boot CPU */
-    int (*init)(void);
 
     /* hw_irq_controller to enable/disable/eoi host irq */
     const struct hw_interrupt_type *host_irq_type;
@@ -43,9 +41,15 @@ struct intc_hw_operations {
     void (*handle_interrupt)(struct cpu_user_regs *regs);
 };
 
+struct intc_hw_init_ops {
+    const struct intc_hw_operations *ops;
+    /* Initialize the intc and the boot CPU */
+    int (*init)(void);
+};
+
 void intc_preinit(void);
 
-void register_intc_ops(const struct intc_hw_operations *ops);
+void register_intc_ops(const struct intc_hw_init_ops *init_ops);
 
 void intc_init(void);
 
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index ea317aea5a..3600d23bdb 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -12,9 +12,12 @@
 
 static const struct intc_hw_operations *__ro_after_init intc_hw_ops;
 
-void __init register_intc_ops(const struct intc_hw_operations *ops)
+static const struct intc_hw_init_ops *__initdata intc_hw_init_ops;
+
+void __init register_intc_ops(const struct intc_hw_init_ops *init_ops)
 {
-    intc_hw_ops = ops;
+    intc_hw_ops = init_ops->ops;
+    intc_hw_init_ops = init_ops;
 }
 
 void __init intc_preinit(void)
@@ -27,7 +30,9 @@ void __init intc_preinit(void)
 
 void __init intc_init(void)
 {
-    if ( intc_hw_ops->init() )
+    ASSERT(intc_hw_init_ops && intc_hw_init_ops->init);
+
+    if ( intc_hw_init_ops->init() )
         panic("Failed to initialize the interrupt controller drivers\n");
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:56:55 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:56:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427269.1649932 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alb-0006gO-18; Mon, 21 Sep 2026 09:56:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427269.1649932; Mon, 21 Sep 2026 09:56:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ala-0006gG-Uu; Mon, 21 Sep 2026 09:56:54 +0000
Received: by outflank-mailman (input) for mailman id 1427269;
 Mon, 21 Sep 2026 09:56:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8alZ-0006g2-6w
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:56:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alY-008t4g-2m
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alZ-007ni3-0V
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:56:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Sx0R6RumE09AFGlnwIajeznjTHpbJePyK0SdK054DCQ=; b=ogE/+GDba4YV6rR4YcuTV310pG
	fctFL3PayFkrTdZcCwUjsQ/cytP8tWUf5gQhoVDTPTXA2ORB/RaWyGax+eIRXbfZ/BXmbTSGSu6GY
	JiAzB5lzYKyhpRaVtoQsVE3B7qdpqX+hwjs6yi41Kr+4lHB7Ip3/impiNYGj0ImxNtkM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: implement make_intc_domU_node()
Message-Id: <E1x8alZ-007ni3-0V@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:56:53 +0000

commit ff930346ef7943df4e157a6d5a32ae21ec8ac090
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:27 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:55 2026 +0200

    xen/riscv: implement make_intc_domU_node()
    
    Introduce a RISC-V specific function to create an interrupt controller
    Device Tree node for DomU domains during dom0less build.
    
    Add make_intc_domU_node() to the dom0less build path and wire it to
    a new generic helper, intc_make_domu_dt_node(), which delegates DT
    node creation to the active interrupt controller implementation via
    vintc_init_ops.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/domain.h |  2 ++
 xen/arch/riscv/include/asm/intc.h   | 10 ++++++++++
 xen/arch/riscv/intc.c               |  8 ++++++++
 3 files changed, 20 insertions(+)

diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/asm/domain.h
index 8ae01a5e4d..bd43ed08c2 100644
--- a/xen/arch/riscv/include/asm/domain.h
+++ b/xen/arch/riscv/include/asm/domain.h
@@ -97,6 +97,8 @@ struct arch_domain {
     struct paging_domain paging;
 
     const unsigned long *isa;
+
+    struct vintc *vintc;
 };
 
 #include <xen/sched.h>
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index d7b34fc15a..a4e678fad9 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -16,6 +16,7 @@ enum intc_variant {
 
 struct cpu_user_regs;
 struct irq_desc;
+struct kernel_info;
 
 struct intc_info {
     enum intc_variant hw_variant;
@@ -47,6 +48,15 @@ struct intc_hw_init_ops {
     int (*init)(void);
 };
 
+struct vintc_init_ops {
+    /* Create interrupt controller node for domain */
+    int (*make_domu_dt_node)(struct kernel_info *kinfo);
+};
+
+struct vintc {
+    const struct vintc_init_ops *init_ops;
+};
+
 void intc_preinit(void);
 
 void register_intc_ops(const struct intc_hw_init_ops *init_ops);
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index 3600d23bdb..e63da5e22e 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -3,6 +3,7 @@
 #include <xen/acpi.h>
 #include <xen/bug.h>
 #include <xen/device_tree.h>
+#include <xen/fdt-kernel.h>
 #include <xen/init.h>
 #include <xen/irq.h>
 #include <xen/lib.h>
@@ -72,3 +73,10 @@ void intc_route_irq_to_xen(struct irq_desc *desc, unsigned int priority)
     intc_set_irq_type(desc, desc->arch.type);
     intc_set_irq_priority(desc, priority);
 }
+
+int __init make_intc_domU_node(struct kernel_info *kinfo)
+{
+    const struct vintc *vintc = kinfo->bd.d->arch.vintc;
+
+    return vintc->init_ops->make_domu_dt_node(kinfo);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:57:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:57:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427270.1649935 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8all-0006iK-2T; Mon, 21 Sep 2026 09:57:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427270.1649935; Mon, 21 Sep 2026 09:57:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alk-0006iC-WF; Mon, 21 Sep 2026 09:57:05 +0000
Received: by outflank-mailman (input) for mailman id 1427270;
 Mon, 21 Sep 2026 09:57:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8alj-0006i6-9x
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:57:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ali-008t51-31
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alj-007oRH-0m
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=k5it9MS0dMshtvTz+couqVyLq5Ujs8jo2+3lCBPuRBI=; b=j6/vDYs6fayBJGPrJgs5oF66Fn
	ZpDnZLrVWzKTnKrKKjoD8aONHq4ARRzjuEARRqxUqED7340+kDWQkSnUH+oHpQp/exINe5ZZ4Or7Y
	9Zd/xYl2u+M7DylUrcnIuT/2nA8uyQZ5whuwsy+4t6rztwormrZDEjgUGWqZ1NBIpisU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: introduce aia_init() and aia_usable()
Message-Id: <E1x8alj-007oRH-0m@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:57:03 +0000

commit 24a61ce26482e964bf58f4ed8160bc5c27bf4ad5
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:28 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:09 2026 +0200

    xen/riscv: introduce aia_init() and aia_usable()
    
    aia_init() is going to contain all the logic related to AIA initialization.
    
    At the moment, it only checks whether the SSAIA extension is available,
    and if so, sets is_aia_usable (which  indicates more than just the
    availability of the extension) to true; it also signifies that the necessary
    components (to be introduced in follow-up patches) have been initialized.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/Makefile          |  1 +
 xen/arch/riscv/aia.c             | 23 +++++++++++++++++++++++
 xen/arch/riscv/include/asm/aia.h | 10 ++++++++++
 xen/arch/riscv/intc.c            |  3 +++
 4 files changed, 37 insertions(+)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 2d24670dfc..8e7a6370ee 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,3 +1,4 @@
+obj-y += aia.o
 obj-y += aplic.o
 obj-y += cpufeature.o
 obj-y += domain.o
diff --git a/xen/arch/riscv/aia.c b/xen/arch/riscv/aia.c
new file mode 100644
index 0000000000..e31c9c2d24
--- /dev/null
+++ b/xen/arch/riscv/aia.c
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/errno.h>
+#include <xen/init.h>
+#include <xen/sections.h>
+#include <xen/types.h>
+
+#include <asm/cpufeature.h>
+
+static bool __ro_after_init _aia_usable;
+
+bool aia_usable(void)
+{
+    return _aia_usable;
+}
+
+void __init aia_init(void)
+{
+    if ( !riscv_isa_extension_available(NULL, RISCV_ISA_EXT_ssaia) )
+        return;
+
+    _aia_usable = true;
+}
diff --git a/xen/arch/riscv/include/asm/aia.h b/xen/arch/riscv/include/asm/aia.h
new file mode 100644
index 0000000000..aaa4bf91fc
--- /dev/null
+++ b/xen/arch/riscv/include/asm/aia.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef RISCV_AIA_H
+#define RISCV_AIA_H
+
+bool aia_usable(void);
+
+void aia_init(void);
+
+#endif /* RISCV_AIA_H */
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index e63da5e22e..2864a896b6 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -9,6 +9,7 @@
 #include <xen/lib.h>
 #include <xen/spinlock.h>
 
+#include <asm/aia.h>
 #include <asm/intc.h>
 
 static const struct intc_hw_operations *__ro_after_init intc_hw_ops;
@@ -33,6 +34,8 @@ void __init intc_init(void)
 {
     ASSERT(intc_hw_init_ops && intc_hw_init_ops->init);
 
+    aia_init();
+
     if ( intc_hw_init_ops->init() )
         panic("Failed to initialize the interrupt controller drivers\n");
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:57:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:57:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427271.1649940 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alv-0006kC-45; Mon, 21 Sep 2026 09:57:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427271.1649940; Mon, 21 Sep 2026 09:57:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8alv-0006k4-1J; Mon, 21 Sep 2026 09:57:15 +0000
Received: by outflank-mailman (input) for mailman id 1427271;
 Mon, 21 Sep 2026 09:57:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8alt-0006jw-C1
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:57:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alt-008t57-04
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8alt-007pAe-11
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=kjW0y+qNT6BPMEprpenHTSElEB5fk3eNMf4zBIOAG3o=; b=srVgsBa56CCGzial0tfFjn05mo
	mepFbzQb9aWw5fO9pbFxuN9cFqlqUYd9srmJmqtgn08TgAqGx8O+Smksr2/EhDYVjxYhZhONPfZtY
	ti+WkUY4Fwl52Qh0SXSjPtBFYYu9aJdqWgf2f3iVpyyEjR/OTX6YtJ7Vw07xDDJ8uT7k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: introduce per-vCPU IMSIC state
Message-Id: <E1x8alt-007pAe-11@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:57:13 +0000

commit bbbe70852ad45713e73420150711e263aa48ee2f
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:29 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:21 2026 +0200

    xen/riscv: introduce per-vCPU IMSIC state
    
    Each vCPU interacting with the IMSIC requires state to track the
    associated guest interrupt file and its backing context.
    
    Introduce a per-vCPU structure to hold IMSIC-related state, including
    the guest interrupt file identifier and the CPU providing the backing
    VS-file. Access to the guest file identifier is protected by a lock.
    
    Initialize this structure during vCPU setup and store it in arch_vcpu.
    The initial state marks the VS-file as software-backed until it becomes
    associated with a physical CPU.
    
    Add helper to retrieve the guest interrupt file identifier:
    - vcpu_guest_file_id() is going to be used during update of APLIC's
      target register with the pair of information <guest_file_id, cpu_id>
      (to have MSI delivery mode work properly) when guest is trying to
      access vAPLIC's target register.
    It will be used in the follow up patches.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/imsic.c              | 35 +++++++++++++++++++++++++++++++++++
 xen/arch/riscv/include/asm/domain.h |  2 ++
 xen/arch/riscv/include/asm/imsic.h  | 22 ++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index 8da72c0072..4a2ef5069d 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -16,6 +16,7 @@
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/macros.h>
+#include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
 #include <xen/xvmalloc.h>
@@ -56,6 +57,11 @@ do {                            \
     csr_clear(CSR_SIREG, v);    \
 } while (0)
 
+unsigned int vcpu_guest_file_id(const struct vcpu *v)
+{
+    return ACCESS_ONCE(v->arch.vimsic_state->guest_file_id);
+}
+
 void __init imsic_ids_local_delivery(bool enable)
 {
     if ( enable )
@@ -312,6 +318,35 @@ static int imsic_parse_node(const struct dt_device_node *node,
     return 0;
 }
 
+int vcpu_imsic_init(struct vcpu *v)
+{
+    struct vimsic_state *imsic_state;
+
+    /* Allocate IMSIC context */
+    imsic_state = xvzalloc(struct vimsic_state);
+    if ( !imsic_state )
+        return -ENOMEM;
+
+    /* Setup IMSIC context  */
+    rwlock_init(&imsic_state->vsfile_lock);
+
+    /*
+     * xvzalloc() already cleared the context, so guest_file_id == 0, i.e. the
+     * always-available s/w IMSIC VS-file. Only vsfile_cpu needs an explicit
+     * initializer as its s/w VS-file value is NR_CPUS rather than 0.
+     */
+    imsic_state->vsfile_cpu = NR_CPUS;
+
+    v->arch.vimsic_state = imsic_state;
+
+    return 0;
+}
+
+void vcpu_imsic_deinit(struct vcpu *v)
+{
+    XVFREE(v->arch.vimsic_state);
+}
+
 /*
  * Initialize the imsic_cfg structure based on the IMSIC DT node.
  *
diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/asm/domain.h
index bd43ed08c2..e035b33ddf 100644
--- a/xen/arch/riscv/include/asm/domain.h
+++ b/xen/arch/riscv/include/asm/domain.h
@@ -54,6 +54,8 @@ struct arch_vcpu {
 
     struct vtimer vtimer;
 
+    struct vimsic_state *vimsic_state;
+
     register_t hcounteren;
     register_t hedeleg;
     register_t hideleg;
diff --git a/xen/arch/riscv/include/asm/imsic.h b/xen/arch/riscv/include/asm/imsic.h
index c6c59215df..5ee954bbf3 100644
--- a/xen/arch/riscv/include/asm/imsic.h
+++ b/xen/arch/riscv/include/asm/imsic.h
@@ -11,6 +11,7 @@
 #ifndef ASM_RISCV_IMSIC_H
 #define ASM_RISCV_IMSIC_H
 
+#include <xen/rwlock.h>
 #include <xen/spinlock.h>
 #include <xen/stdbool.h>
 #include <xen/types.h>
@@ -61,7 +62,24 @@ struct imsic_config {
     spinlock_t lock;
 };
 
+struct vimsic_state {
+    /* IMSIC VS-file */
+    rwlock_t vsfile_lock;
+    /*
+     * s/w IMSIC VS-file -> guest_file_id == 0
+     * h/w IMSIC VS-file -> guest_file_id > 0
+     */
+    unsigned int guest_file_id;
+    /*
+     * s/w IMSIC VS-file -> vsfile_cpu == NR_CPUS
+     * h/w IMSIC VS-file -> vsfile_cpu < NR_CPUS
+     */
+    unsigned int vsfile_cpu;
+};
+
 struct dt_device_node;
+struct vcpu;
+
 int imsic_init(const struct dt_device_node *node);
 
 const struct imsic_config *imsic_get_config(void);
@@ -71,4 +89,8 @@ void imsic_irq_disable(unsigned int hwirq);
 
 void imsic_ids_local_delivery(bool enable);
 
+int vcpu_imsic_init(struct vcpu *v);
+void vcpu_imsic_deinit(struct vcpu *v);
+unsigned int vcpu_guest_file_id(const struct vcpu *v);
+
 #endif /* ASM_RISCV_IMSIC_H */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:57:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:57:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427272.1649944 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8am5-0006mG-5b; Mon, 21 Sep 2026 09:57:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427272.1649944; Mon, 21 Sep 2026 09:57:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8am5-0006m8-2b; Mon, 21 Sep 2026 09:57:25 +0000
Received: by outflank-mailman (input) for mailman id 1427272;
 Mon, 21 Sep 2026 09:57:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8am3-0006m1-F9
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:57:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8am3-008t5J-0M
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8am3-007q3G-1J
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=guMpcxvV9wZ+chb9A4zYf3rCq/84KYITTiNpF/I/C4g=; b=Pj+szG94HUsT7Y4/+CMIH4dODx
	5kFr+y8qC0odrkZBFRnhABwIH1QCix145IMbLUCWFqb3oweQCvO3j8gPnsHX18c1MUFbLTwycuood
	8VT4Sph+TdvQ2nrx+BhS1K5FkHSbooFJDjuXkVrEhEp6iwUBsMD0ECeqcjTejpL/zKX4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure
Message-Id: <E1x8am3-007q3G-1J@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:57:23 +0000

commit 9164a97efbeb57a8e53b129189223abb8cbc4250
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:30 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:35 2026 +0200

    xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure
    
    At the current development stage, only domain vINTC init and deinit
    operations are required, so implement those first.
    
    Initialize vAPLIC's domaincfg to with the interrupt-enable bit set and
    MSI delivery mode selected as the current solution is exepcted to have
    always IMSIC, and initialize vintc->ops.
    
    Other operations such as emulate_load(), emulate_store(), and is_access()
    will be needed once guests are running and MMIO accesses to APLIC MMIO
    range must be handled. These will be introduced separately later.
    
    Introduce a structure to describe a virtual interrupt controller (vINTC)
    and a vintc_ops structure, which provides operations to emulate load and
    store accesses to interrupt controller MMIOs and to check whether a given
    address falls within the MMIO range of a specific virtual interrupt
    controller.
    Note that already existed init_ops field in struct vintc will be init-ed
    for APLIC in the follow up patch.
    
    The vAPLIC implementation of these operations will be provided later
    once guests can be run and these operations are actually needed.
    
    Introduce these structures here as they are required for the implementation
    of domain_vaplic_init() and domain_vaplic_alloc(). Also, introduce
    vaplic_init() and init vintc_ops->vcpu_init() with it.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/Makefile             |  1 +
 xen/arch/riscv/domain.c             | 11 +++-----
 xen/arch/riscv/imsic.c              |  4 +--
 xen/arch/riscv/include/asm/aplic.h  |  7 +++++
 xen/arch/riscv/include/asm/intc.h   | 12 +++++++++
 xen/arch/riscv/include/asm/vaplic.h | 34 ++++++++++++++++++++++++
 xen/arch/riscv/vaplic.c             | 52 +++++++++++++++++++++++++++++++++++++
 7 files changed, 111 insertions(+), 10 deletions(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 8e7a6370ee..fcd73c7a2d 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -25,6 +25,7 @@ obj-y += smpboot.o
 obj-y += stubs.o
 obj-y += time.o
 obj-y += traps.o
+obj-y += vaplic.o
 obj-y += vmid.o
 obj-y += vm_event.o
 obj-y += vsbi/
diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c
index c993314759..45712d3059 100644
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -11,6 +11,7 @@
 #include <asm/bitops.h>
 #include <asm/cpufeature.h>
 #include <asm/csr.h>
+#include <asm/intc.h>
 #include <asm/riscv_encoding.h>
 #include <asm/vtimer.h>
 
@@ -155,14 +156,8 @@ int arch_vcpu_create(struct vcpu *v)
     if ( (rc = vcpu_vtimer_init(v)) )
         goto fail;
 
-    /*
-     * As interrupt controller (IC) is not yet implemented,
-     * return an error.
-     *
-     * TODO: Drop this once IC is implemented.
-     */
-    rc = -EOPNOTSUPP;
-    goto fail;
+    if ( (rc = v->domain->arch.vintc->ops->vcpu_init(v)) )
+        goto fail;
 
     return rc;
 
diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index 4a2ef5069d..809f29af86 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -318,7 +318,7 @@ static int imsic_parse_node(const struct dt_device_node *node,
     return 0;
 }
 
-int vcpu_imsic_init(struct vcpu *v)
+int cf_check vcpu_imsic_init(struct vcpu *v)
 {
     struct vimsic_state *imsic_state;
 
@@ -342,7 +342,7 @@ int vcpu_imsic_init(struct vcpu *v)
     return 0;
 }
 
-void vcpu_imsic_deinit(struct vcpu *v)
+void cf_check vcpu_imsic_deinit(struct vcpu *v)
 {
     XVFREE(v->arch.vimsic_state);
 }
diff --git a/xen/arch/riscv/include/asm/aplic.h b/xen/arch/riscv/include/asm/aplic.h
index b0724fe6f3..5a7fcb6ec4 100644
--- a/xen/arch/riscv/include/asm/aplic.h
+++ b/xen/arch/riscv/include/asm/aplic.h
@@ -15,8 +15,15 @@
 
 #include <asm/imsic.h>
 
+/*
+ * domaincfg read-only fields (AIA spec):
+ *  - bits [31:24] -> read-only 0x80
+ *  - bit 7        -> read-only 0
+ */
+#define APLIC_DOMAINCFG_RO      (0x80U << 24)
 #define APLIC_DOMAINCFG_IE      BIT(8, U)
 #define APLIC_DOMAINCFG_DM      BIT(2, U)
+#define APLIC_DOMAINCFG_BE      BIT(0, U)
 
 #define APLIC_SOURCECFG_SM_INACTIVE     0x0
 #define APLIC_SOURCECFG_SM_DETACH       0x1
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index a4e678fad9..8757288852 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -17,6 +17,7 @@ enum intc_variant {
 struct cpu_user_regs;
 struct irq_desc;
 struct kernel_info;
+struct vcpu;
 
 struct intc_info {
     enum intc_variant hw_variant;
@@ -53,8 +54,19 @@ struct vintc_init_ops {
     int (*make_domu_dt_node)(struct kernel_info *kinfo);
 };
 
+struct vintc_ops {
+    /* Initialize some vINTC-related stuff for a vCPU */
+    int (*vcpu_init)(struct vcpu *v);
+
+    /* Deinitialize some vINTC-related stuff for a vCPU */
+    void (*vcpu_deinit)(struct vcpu *v);
+};
+
 struct vintc {
+    /* Callbacks invoked during domain construction only. */
     const struct vintc_init_ops *init_ops;
+    /* Runtime callbacks used for the lifetime of the guest. */
+    const struct vintc_ops *ops;
 };
 
 void intc_preinit(void);
diff --git a/xen/arch/riscv/include/asm/vaplic.h b/xen/arch/riscv/include/asm/vaplic.h
new file mode 100644
index 0000000000..96080bfbc2
--- /dev/null
+++ b/xen/arch/riscv/include/asm/vaplic.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * xen/arch/riscv/vaplic.c
+ *
+ * Virtual RISC-V Advanced Platform-Level Interrupt Controller support
+ *
+ * Copyright (c) Microchip.
+ */
+
+#ifndef ASM__RISCV__VAPLIC_H
+#define ASM__RISCV__VAPLIC_H
+
+#include <xen/kernel.h>
+#include <xen/types.h>
+
+#include <asm/intc.h>
+
+struct domain;
+
+#define to_vaplic(d) container_of((d)->arch.vintc, struct vaplic, vintc)
+
+struct vaplic_regs {
+    uint32_t domaincfg;
+};
+
+struct vaplic {
+    struct vintc vintc;
+    struct vaplic_regs regs;
+};
+
+int domain_vaplic_init(struct domain *d);
+void domain_vaplic_deinit(struct domain *d);
+
+#endif /* ASM__RISCV__VAPLIC_H */
diff --git a/xen/arch/riscv/vaplic.c b/xen/arch/riscv/vaplic.c
new file mode 100644
index 0000000000..c9f188b989
--- /dev/null
+++ b/xen/arch/riscv/vaplic.c
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * xen/arch/riscv/vaplic.c
+ *
+ * Virtual RISC-V Advanced Platform-Level Interrupt Controller support
+ *
+ * Copyright (c) Microchip.
+ * Copyright (c) Vates
+ */
+
+#include <xen/errno.h>
+#include <xen/sched.h>
+#include <xen/xvmalloc.h>
+
+#include <asm/aia.h>
+#include <asm/imsic.h>
+#include <asm/intc.h>
+#include <asm/vaplic.h>
+
+#include "aplic-priv.h"
+
+static const struct vintc_ops vintc_ops = {
+    .vcpu_init = vcpu_imsic_init,
+    .vcpu_deinit = vcpu_imsic_deinit,
+};
+
+int domain_vaplic_init(struct domain *d)
+{
+    struct vaplic *vaplic = xvzalloc(struct vaplic);
+
+    if ( !vaplic )
+        return -ENOMEM;
+
+    d->arch.vintc = &vaplic->vintc;
+    d->arch.vintc->ops = &vintc_ops;
+
+    vaplic->regs.domaincfg = APLIC_DOMAINCFG_RO;
+
+    return 0;
+}
+
+void domain_vaplic_deinit(struct domain *d)
+{
+    struct vaplic *vaplic;
+
+    if ( !d->arch.vintc )
+        return;
+
+    vaplic = to_vaplic(d);
+    d->arch.vintc = NULL;
+    xvfree(vaplic);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:57:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:57:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427273.1649948 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amF-0006ox-87; Mon, 21 Sep 2026 09:57:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427273.1649948; Mon, 21 Sep 2026 09:57:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amF-0006oq-5H; Mon, 21 Sep 2026 09:57:35 +0000
Received: by outflank-mailman (input) for mailman id 1427273;
 Mon, 21 Sep 2026 09:57:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8amD-0006oU-Hv
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:57:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amD-008t5X-0e
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amD-007quM-1b
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ucUkp5PlzeuZOFeqSdEK/F7VZ4Lb7AWorMUB1biiskU=; b=XJs2UlEV0bG2I3eAygdDpuKZpz
	l5mt279iuWUiEXJ6IshaqIRUnVqkNR4QECOXsi4zWipDpIsBGNPPWRn8hNz67ocBzlcMsriq1n7FI
	6R3vs0Vuvnz56EKFb5SA71f4N0ixeiR1uyRnQ0+WHK0bankB93X9LNyyUPlvwA1RfFqE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: introduce (de)initialization helpers for vINTC
Message-Id: <E1x8amD-007quM-1b@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:57:33 +0000

commit 68ca2185e0fb316fd55a5df567f4f6768aec9c9e
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:31 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:47 2026 +0200

    xen/riscv: introduce (de)initialization helpers for vINTC
    
    Add common helpers domain_vintc_init() and domain_vintc_deinit() to
    allocate and deallocate a virtual interrupt controller (vINTC)
    structure and initialize basic virtual interrupt controller registers.
    
    domain_vintc_deinit() isn't called at the moment as arch_domain_destroy()
    is implemented as stub at the moment.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/domain.c           |  7 ++++++-
 xen/arch/riscv/include/asm/intc.h |  3 +++
 xen/arch/riscv/intc.c             | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c
index 45712d3059..d94652809e 100644
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -291,7 +291,9 @@ int arch_sanitise_domain_config(struct xen_domctl_createdomain *config)
 
 void arch_domain_destroy(struct domain *d)
 {
-    printk(XENLOG_WARNING "%s: unimplemented\n", __func__);
+    printk(XENLOG_WARNING "%s: not fully implemented\n", __func__);
+
+    domain_vintc_deinit(d);
 }
 
 int arch_domain_create(struct domain *d,
@@ -308,6 +310,9 @@ int arch_domain_create(struct domain *d,
     if ( (rc = p2m_init(d, config)) != 0)
         goto fail;
 
+    if ( (rc = domain_vintc_init(d)) )
+        goto fail;
+
     return rc;
 
  fail:
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index 8757288852..6fc0e620e9 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -79,4 +79,7 @@ void intc_route_irq_to_xen(struct irq_desc *desc, unsigned int priority);
 
 void intc_handle_external_irqs(struct cpu_user_regs *regs);
 
+int domain_vintc_init(struct domain *d);
+void domain_vintc_deinit(struct domain *d);
+
 #endif /* ASM__RISCV__INTERRUPT_CONTOLLER_H */
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index 2864a896b6..f5c8af6dde 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -11,6 +11,7 @@
 
 #include <asm/aia.h>
 #include <asm/intc.h>
+#include <asm/vaplic.h>
 
 static const struct intc_hw_operations *__ro_after_init intc_hw_ops;
 
@@ -83,3 +84,37 @@ int __init make_intc_domU_node(struct kernel_info *kinfo)
 
     return vintc->init_ops->make_domu_dt_node(kinfo);
 }
+
+int domain_vintc_init(struct domain *d)
+{
+    int ret = -EOPNOTSUPP;
+    const enum intc_variant variant = intc_hw_ops->info->hw_variant;
+
+    switch ( variant )
+    {
+    case INTC_APLIC:
+        ret = domain_vaplic_init(d);
+        break;
+
+    default:
+        printk_once("vintc (variant:%d) isn't implemented\n", variant);
+        break;
+    }
+
+    return ret;
+}
+
+void domain_vintc_deinit(struct domain *d)
+{
+    const enum intc_variant variant = intc_hw_ops->info->hw_variant;
+
+    switch ( variant )
+    {
+    case INTC_APLIC:
+        domain_vaplic_deinit(d);
+        break;
+
+    default:
+        break;
+    }
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:57:45 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:57:45 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427274.1649951 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amP-0006tF-9g; Mon, 21 Sep 2026 09:57:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427274.1649951; Mon, 21 Sep 2026 09:57:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amP-0006t5-6p; Mon, 21 Sep 2026 09:57:45 +0000
Received: by outflank-mailman (input) for mailman id 1427274;
 Mon, 21 Sep 2026 09:57:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8amN-0006sx-KR
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:57:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amN-008t65-0u
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amN-007rlR-1s
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sLiH+BJm/4HpHEvM2ZgOZbhYhIaBZE6eM5j8RjC+NKU=; b=bgmrzGbOfXEe8qMq07XwMFyKiB
	J21jM8MLLYx1+1YH2/wJYGSKF2d1mDxKnIZ58Budgt+avM6gwn/4rFCYJiwcJhuXrj57ag8jF8id9
	zb7M4915HWXaEVwe7wVedvaxg1/4U3yCtruCJbsjjPmYs+Wrzte8lHu7cB9N/F49ptYo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: generate IMSIC DT node for guest domains
Message-Id: <E1x8amN-007rlR-1s@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:57:43 +0000

commit 3559e12585322e534cfd2bb27d0fcb6ff4d1834d
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:32 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:09:00 2026 +0200

    xen/riscv: generate IMSIC DT node for guest domains
    
    Guests using the IMSIC interrupt controller require a corresponding
    Device Tree description.
    
    Add support for generating an IMSIC node when building the guest DT.
    This allows guests to discover and use the IMSIC interrupt controller.
    
    The value choosen for GUEST_IMSIC_S_BASE is an address which is typically
    used for IMSIC and QEMU.
    
    DT-building functions are marked __init because domain creation happens at
    boot time, before the init sections are freed. In a typical deployment
    libxl creates the interrupt controller node in userspace and hands the
    complete FDT to Xen, so these functions are only called during early
    domain construction.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/imsic.c                    | 143 +++++++++++++++++++++++++++++-
 xen/arch/riscv/include/asm/guest-layout.h |   6 ++
 xen/arch/riscv/include/asm/imsic.h        |   3 +
 3 files changed, 151 insertions(+), 1 deletion(-)

diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index 809f29af86..44b8640ea3 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -13,8 +13,12 @@
 #include <xen/const.h>
 #include <xen/cpumask.h>
 #include <xen/device_tree.h>
+#include <xen/domain.h>
 #include <xen/errno.h>
+#include <xen/fdt-domain-build.h>
+#include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/macros.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
@@ -34,6 +38,21 @@ static struct imsic_config imsic_cfg = {
     .lock = SPIN_LOCK_UNLOCKED,
 };
 
+/*
+ * Number of MSIs available to a guest. Determined by the host interrupt
+ * controller, so it is identical for every domain -- hence a single global
+ * rather than a per-domain value.
+ */
+static unsigned int __ro_after_init guest_num_msis;
+
+#define GUEST_IMSIC_COMPATIBLE "riscv,imsics"
+
+/*
+ * Value is inspired by what QEMU is using for riscv,num-ids property for IMSIC
+ * node.
+ */
+#define GUEST_IMSIC_MAX_MSIS 255U
+
 #define IMSIC_DISABLE_EIDELIVERY    0
 #define IMSIC_ENABLE_EIDELIVERY     1
 #define IMSIC_DISABLE_EITHRESHOLD   1
@@ -182,7 +201,7 @@ static int __init imsic_get_parent_hartid(const struct dt_device_node *node,
  * or IRQ_M_EXT if the IMSIC node corresponds to a machine-mode IMSIC,
  * which should be ignored by the hypervisor.
  */
-static int imsic_parse_node(const struct dt_device_node *node,
+static int __init imsic_parse_node(const struct dt_device_node *node,
                             unsigned int *nr_parent_irqs,
                             unsigned int *nr_mmios)
 {
@@ -285,6 +304,11 @@ static int imsic_parse_node(const struct dt_device_node *node,
         return -ENOENT;
     }
 
+    if ( dt_property_read_u32(node, "riscv,num-guest-ids", &tmp) )
+        guest_num_msis = min(GUEST_IMSIC_MAX_MSIS, tmp);
+    else
+        guest_num_msis = GUEST_IMSIC_MAX_MSIS;
+
     if ( (imsic_cfg.nr_ids < IMSIC_MIN_ID) ||
          (imsic_cfg.nr_ids > IMSIC_MAX_ID) )
     {
@@ -526,3 +550,120 @@ int __init imsic_init(const struct dt_device_node *node)
 
     return rc;
 }
+
+static int __init guest_imsic_make_reg_property(struct domain *d, void *fdt)
+{
+    paddr_t size = IMSIC_MMIO_PAGE_SZ * d->max_vcpus;
+    __be32 regs[4] = {
+        cpu_to_be32(GUEST_IMSIC_S_BASE >> 32),
+        cpu_to_be32(GUEST_IMSIC_S_BASE),
+        cpu_to_be32(size >> 32),
+        cpu_to_be32(size),
+    };
+
+    return fdt_property(fdt, "reg", regs, sizeof(regs));
+}
+
+static int __init guest_imsic_set_interrupt_extended_prop(struct domain *d,
+                                                          void *fdt)
+{
+    unsigned int cpu, pos = 0;
+    __be32 *irq_ext;
+    int res;
+
+    irq_ext = xvzalloc_array(__be32, d->max_vcpus * 2);
+    if ( !irq_ext )
+        return -ENOMEM;
+
+    for ( cpu = 0; cpu < d->max_vcpus; cpu++ )
+    {
+        char buf[64];
+        uint32_t phandle;
+
+        snprintf(buf, ARRAY_SIZE(buf), "/cpus/cpu@%u/interrupt-controller", cpu);
+        phandle = fdt_get_phandle(fdt, fdt_path_offset(fdt, buf));
+
+        if ( !phandle )
+        {
+            res = -ENODEV;
+            goto out;
+        }
+
+        irq_ext[pos++] = cpu_to_be32(phandle);
+        irq_ext[pos++] = cpu_to_be32(IRQ_S_EXT);
+    }
+
+    res = fdt_property(fdt, "interrupts-extended", irq_ext,
+                       d->max_vcpus * 2 * sizeof(*irq_ext));
+
+ out:
+    xvfree(irq_ext);
+
+    return res;
+}
+
+int __init vimsic_make_domu_dt_node(struct kernel_info *kinfo,
+                                    unsigned int *phandle)
+{
+    int res;
+    void *fdt = kinfo->fdt;
+    char vimsic_name[32];
+    unsigned int vimsic_phandle;
+
+    res = snprintf(vimsic_name, ARRAY_SIZE(vimsic_name), "/soc/imsic@%lx",
+                   GUEST_IMSIC_S_BASE);
+    if ( res >= ARRAY_SIZE(vimsic_name) )
+    {
+        dprintk(XENLOG_DEBUG, "vimsic name is truncated\n");
+        return -ENOBUFS;
+    }
+
+    res = fdt_begin_node(fdt, vimsic_name);
+    if ( res )
+        return res;
+
+    res = fdt_property_string(fdt, "compatible", GUEST_IMSIC_COMPATIBLE);
+    if ( res )
+        return res;
+
+    res = guest_imsic_make_reg_property(kinfo->bd.d, fdt);
+    if ( res )
+        return res;
+
+    res = guest_imsic_set_interrupt_extended_prop(kinfo->bd.d, fdt);
+    if ( res )
+        return res;
+
+    res = fdt_property_u32(fdt, "riscv,num-ids", guest_num_msis);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "msi-controller", NULL, 0);
+    if ( res )
+        return res;
+
+    res = fdt_property_u32(fdt, "#msi-cells", 0);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "interrupt-controller", NULL, 0);
+    if ( res )
+        return res;
+
+    res = fdt_property_u32(fdt, "#interrupt-cells", 0);
+    if ( res )
+        return res;
+
+    vimsic_phandle = alloc_phandle(kinfo);
+    if ( !vimsic_phandle )
+        return -EOVERFLOW;
+
+    res = fdt_property_cell(fdt, "phandle", vimsic_phandle);
+    if ( res )
+        return res;
+
+    if ( phandle )
+        *phandle = vimsic_phandle;
+
+    return fdt_end_node(fdt);
+}
diff --git a/xen/arch/riscv/include/asm/guest-layout.h b/xen/arch/riscv/include/asm/guest-layout.h
index 68d95a0939..5e566450bd 100644
--- a/xen/arch/riscv/include/asm/guest-layout.h
+++ b/xen/arch/riscv/include/asm/guest-layout.h
@@ -3,6 +3,12 @@
 
 #include <public/xen.h>
 
+/*
+ * Base address of the guest's supervisor-mode IMSIC. The value is the address
+ * typically used for IMSIC by QEMU.
+ */
+#define GUEST_IMSIC_S_BASE _UL(0x28000000)
+
 #define GUEST_RAM_BANKS   2
 
 /*
diff --git a/xen/arch/riscv/include/asm/imsic.h b/xen/arch/riscv/include/asm/imsic.h
index 5ee954bbf3..2425430ed1 100644
--- a/xen/arch/riscv/include/asm/imsic.h
+++ b/xen/arch/riscv/include/asm/imsic.h
@@ -78,6 +78,7 @@ struct vimsic_state {
 };
 
 struct dt_device_node;
+struct kernel_info;
 struct vcpu;
 
 int imsic_init(const struct dt_device_node *node);
@@ -93,4 +94,6 @@ int vcpu_imsic_init(struct vcpu *v);
 void vcpu_imsic_deinit(struct vcpu *v);
 unsigned int vcpu_guest_file_id(const struct vcpu *v);
 
+int vimsic_make_domu_dt_node(struct kernel_info *kinfo, unsigned int *phandle);
+
 #endif /* ASM_RISCV_IMSIC_H */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:57:55 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:57:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427275.1649956 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amZ-0006yA-BM; Mon, 21 Sep 2026 09:57:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427275.1649956; Mon, 21 Sep 2026 09:57:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amZ-0006y2-8b; Mon, 21 Sep 2026 09:57:55 +0000
Received: by outflank-mailman (input) for mailman id 1427275;
 Mon, 21 Sep 2026 09:57:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8amX-0006wf-N3
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:57:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amX-008t6C-1B
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amX-007sWt-28
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:57:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=d1a0U2ibnG0vump7rztTVMwHLaUYnN/4N8Lu5a0mxXk=; b=7M2SlAjmZ9V/7mNQl6IkkMw0HA
	VpImcAkPWn6gU7XcOcfv15JLf4Ijc1GhTyeoUhYdJnBhpAzvYWi8/eMI7jL8TSgXmzs4qBS16di7J
	WYBgdTe3XcTajbMYpaDfO4zrRCQmr532CdglQM580NX+FyU7vv3bDcJNs1oRGX01fi5w=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: create APLIC DT node for guest domains
Message-Id: <E1x8amX-007sWt-28@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:57:53 +0000

commit 3ecc6da8d633d393d1e07b1c5971560ad62dd405
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:33 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:09:06 2026 +0200

    xen/riscv: create APLIC DT node for guest domains
    
    Guests require a Device Tree description of the interrupt controller
    topology. Add support for creating an APLIC node when building the
    guest DT.
    
    Provide stub for imsic_make_dt_node() it will be introduced properly
    in follow-up patch.
    
    The value chosen for GUEST_APLIC_S_BASE is based on QEMU one.
    
    DT-building functions are marked __init because domain creation happens at
    boot time, before the init sections are freed. In a typical deployment
    libxl creates the interrupt controller node in userspace and hands the
    complete FDT to Xen, so these functions are only called during early
    domain construction.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/aplic-priv.h               | 13 ++++++
 xen/arch/riscv/aplic.c                    |  2 +
 xen/arch/riscv/include/asm/aplic.h        |  8 ++++
 xen/arch/riscv/include/asm/guest-layout.h |  6 +++
 xen/arch/riscv/vaplic.c                   | 77 +++++++++++++++++++++++++++++++
 5 files changed, 106 insertions(+)

diff --git a/xen/arch/riscv/aplic-priv.h b/xen/arch/riscv/aplic-priv.h
index 85e0d028d1..35100d3a64 100644
--- a/xen/arch/riscv/aplic-priv.h
+++ b/xen/arch/riscv/aplic-priv.h
@@ -34,4 +34,17 @@ struct aplic_priv {
     const struct imsic_config *imsic_cfg;
 };
 
+/*
+ * Value is inspired by what QEMU is using for riscv,num-sources property for
+ * APLIC node.
+ */
+#define GUEST_APLIC_MAX_SOURCES 96U
+
+/*
+ * Specifies the number of interrupt sources supported by guest APLIC domain.
+ * Could be limited by host interrupt controller and is identical for every
+ * domain for now.
+ */
+extern unsigned int guest_aplic_num_sources;
+
 #endif /* ASM_RISCV_APLIC_PRIV_H */
diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c
index d08401db46..c2d7183e18 100644
--- a/xen/arch/riscv/aplic.c
+++ b/xen/arch/riscv/aplic.c
@@ -92,6 +92,8 @@ static int __init cf_check aplic_init(void)
         panic("%s: failed to get number of interrupt sources\n",
               node->full_name);
 
+    guest_aplic_num_sources = min(GUEST_APLIC_MAX_SOURCES, aplic_info.num_irqs);
+
     if ( aplic_info.num_irqs > ARRAY_SIZE(aplic.regs->sourcecfg) )
         aplic_info.num_irqs = ARRAY_SIZE(aplic.regs->sourcecfg);
 
diff --git a/xen/arch/riscv/include/asm/aplic.h b/xen/arch/riscv/include/asm/aplic.h
index 5a7fcb6ec4..07318aaac2 100644
--- a/xen/arch/riscv/include/asm/aplic.h
+++ b/xen/arch/riscv/include/asm/aplic.h
@@ -34,6 +34,14 @@
 
 #define APLIC_TARGET_HART_IDX_SHIFT 18
 
+#define APLIC_IDC_SIZE          32
+
+#define APLIC_MIN_SIZE          0x4000
+#define APLIC_SIZE_ALIGN(x)     ROUNDUP(x, APLIC_MIN_SIZE)
+
+#define APLIC_SIZE(nr_cpus)     (APLIC_MIN_SIZE + \
+                                 APLIC_SIZE_ALIGN(APLIC_IDC_SIZE * (nr_cpus)))
+
 struct aplic_regs {
     uint32_t domaincfg;         /* 0x0000 */
     uint32_t sourcecfg[1023];   /* 0x0004 */
diff --git a/xen/arch/riscv/include/asm/guest-layout.h b/xen/arch/riscv/include/asm/guest-layout.h
index 5e566450bd..90603f06bb 100644
--- a/xen/arch/riscv/include/asm/guest-layout.h
+++ b/xen/arch/riscv/include/asm/guest-layout.h
@@ -3,6 +3,12 @@
 
 #include <public/xen.h>
 
+/*
+ * Base address of the guest's supervisor-mode APLIC. The value is the address
+ * typically used for APLIC by QEMU.
+ */
+#define GUEST_APLIC_S_BASE _UL(0xd000000)
+
 /*
  * Base address of the guest's supervisor-mode IMSIC. The value is the address
  * typically used for IMSIC by QEMU.
diff --git a/xen/arch/riscv/vaplic.c b/xen/arch/riscv/vaplic.c
index c9f188b989..a529a5b1dc 100644
--- a/xen/arch/riscv/vaplic.c
+++ b/xen/arch/riscv/vaplic.c
@@ -9,6 +9,8 @@
  */
 
 #include <xen/errno.h>
+#include <xen/fdt-kernel.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 #include <xen/xvmalloc.h>
 
@@ -19,6 +21,80 @@
 
 #include "aplic-priv.h"
 
+unsigned int __ro_after_init guest_aplic_num_sources;
+
+#define VAPLIC_COMPATIBLE "riscv,aplic"
+
+#define FDT_VAPLIC_INT_CELLS 2
+
+static int __init cf_check vaplic_make_domu_dt_node(struct kernel_info *kinfo)
+{
+    struct domain *d = kinfo->bd.d;
+    int res;
+    void *fdt = kinfo->fdt;
+    unsigned int msi_parent_phandle;
+    char vaplic_name[32];
+    unsigned int aplic_size = APLIC_SIZE(d->max_vcpus);
+    const __be32 reg[] = {
+        cpu_to_be32(GUEST_APLIC_S_BASE >> 32),
+        cpu_to_be32(GUEST_APLIC_S_BASE),
+        cpu_to_be32(0),
+        cpu_to_be32(aplic_size),
+    };
+
+    BUILD_BUG_ON(APLIC_SIZE(MAX_VIRT_CPUS) > UINT_MAX);
+
+    res = snprintf(vaplic_name, ARRAY_SIZE(vaplic_name), "/soc/aplic@%lx",
+                   GUEST_APLIC_S_BASE);
+    if ( res >= sizeof(vaplic_name) )
+    {
+        dprintk(XENLOG_DEBUG, "vaplic name is truncated\n");
+        return -ENOBUFS;
+    }
+
+    res = vimsic_make_domu_dt_node(kinfo, &msi_parent_phandle);
+    if ( res )
+        return res;
+
+    res = fdt_begin_node(fdt, vaplic_name);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "#interrupt-cells", FDT_VAPLIC_INT_CELLS);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "reg", reg, sizeof(reg));
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "riscv,num-sources", guest_aplic_num_sources);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "interrupt-controller", NULL, 0);
+    if ( res )
+        return res;
+
+    res = fdt_property_string(fdt, "compatible", VAPLIC_COMPATIBLE);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "msi-parent", msi_parent_phandle);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "phandle", kinfo->phandle_intc);
+    if ( res )
+        return res;
+
+    return fdt_end_node(fdt);
+}
+
+static const struct vintc_init_ops __initconstrel init_ops = {
+    .make_domu_dt_node = vaplic_make_domu_dt_node,
+};
+
 static const struct vintc_ops vintc_ops = {
     .vcpu_init = vcpu_imsic_init,
     .vcpu_deinit = vcpu_imsic_deinit,
@@ -33,6 +109,7 @@ int domain_vaplic_init(struct domain *d)
 
     d->arch.vintc = &vaplic->vintc;
     d->arch.vintc->ops = &vintc_ops;
+    d->arch.vintc->init_ops = &init_ops;
 
     vaplic->regs.domaincfg = APLIC_DOMAINCFG_RO;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:58:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:58:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427276.1649960 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amj-000735-Ck; Mon, 21 Sep 2026 09:58:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427276.1649960; Mon, 21 Sep 2026 09:58:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amj-00072y-9z; Mon, 21 Sep 2026 09:58:05 +0000
Received: by outflank-mailman (input) for mailman id 1427276;
 Mon, 21 Sep 2026 09:58:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8amh-00071u-Pc
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:58:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amh-008t6T-1Q
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amh-007tGp-2O
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/n375CyyWjIH3Jk8htI5lr7zytZ3KjqO2LuF3pcxvWo=; b=PSwfuXph2rzoc5NNPe0ssUgptj
	SAlquRxpRirbWUrtEBAfeydrVVFoiPyi+uz6k8mcLLH/lzuGrz3T2+qZM4Il+8rGNmQA9NW0LLPdi
	WHrtZXoXsS02Egio1vpCzdyWagX2wO2+d37DGyuXmF1U5GSD4+MST74osjJyThHbf4Sw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Eclair: re-enable scanning of the (almost) final linking step
Message-Id: <E1x8amh-007tGp-2O@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:58:03 +0000

commit a401b5c9dc35988f57c3c414deeb7ac3f0a02ffa
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 10:09:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:09:45 2026 +0200

    Eclair: re-enable scanning of the (almost) final linking step
    
    The real final binaries are now no longer created by a linker invocation,
    but by renaming an intermediate file (each). Arrange for linking pass 2
    outputs to be scanned instead, yet continue to exclude the auxiliary
    .xen.efi.alt.* binaries.
    
    Fixes: da944a72fdf4 ("x86: split xen-syms/xen.efi linking rules"))
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/analysis.ecl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/analysis.ecl b/automation/eclair_analysis/ECLAIR/analysis.ecl
index 675602e15a..c6e1a7a95d 100644
--- a/automation/eclair_analysis/ECLAIR/analysis.ecl
+++ b/automation/eclair_analysis/ECLAIR/analysis.ecl
@@ -36,8 +36,8 @@ their Standard Library equivalents."
 
 -doc_begin="Do not analyze intermediate linking artifacts, as they do not differ from their final
 counterparts for the purposes of MISRA C static analysis."
--file_tag+={xen_efi_tmp, "^xen/\\.xen\\.efi\\..*$"}
--file_tag+={xen_syms_tmp, "^xen/\\.xen-syms\\..*$"}
+-file_tag+={xen_efi_tmp, "^xen/\\.xen\\.efi\\.([01]|alt\\..*)$"}
+-file_tag+={xen_syms_tmp, "^xen/\\.xen-syms\\.[013]$"}
 -frames+={hide, "kind(program)&&target(xen_syms_tmp||xen_efi_tmp)"}
 -doc_end
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:58:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:58:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427277.1649965 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amt-00074y-Ex; Mon, 21 Sep 2026 09:58:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427277.1649965; Mon, 21 Sep 2026 09:58:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8amt-00074q-BW; Mon, 21 Sep 2026 09:58:15 +0000
Received: by outflank-mailman (input) for mailman id 1427277;
 Mon, 21 Sep 2026 09:58:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8amr-00074i-S8
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:58:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amr-008t6X-1f
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8amr-007u3F-2e
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=932eEzLpnihie/kTWA4fgdSJX60xnvcktShr+9ROGE0=; b=y+LwBlytWHtq2nNiQz3yCOUI7e
	+i3RQzdqcTosukaigA0fo+6MNtmWjw081947+YCdsDom13u5141B7FXGpT43GONCGv/zy4YVeWIJ8
	10e51Z+L/84OABiNtk7UzxYKfymeCQe2ZC+GqgbpHJavNNXVugjAeony6l66z56dBvXU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/viridian: Workaround Hyper-V GP fault writing to MSR
Message-Id: <E1x8amr-007u3F-2e@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:58:13 +0000

commit 33829ead9aedfb21b4103c7ebf1fcc497227a77a
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Mon Sep 21 10:10:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:10:22 2026 +0200

    x86/viridian: Workaround Hyper-V GP fault writing to MSR
    
    The Viridian spec requires the vector to be >= 0x10 when writing to the
    SINTx MSR, otherwise it should #GP fault.
    The spec-defined initial value is 0x10000, i.e. the vector is 0. On
    startup, for some reason Windows 11 Hyper-V tries to set the MSR to
    the spec-defined initial value and since the vector is 0, it GP faults.
    Fix this by doing as Hyper-V does and only fault if the SINT is
    unmasked.
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/viridian/synic.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c
index e6cba7548f..3125ccca0d 100644
--- a/xen/arch/x86/hvm/viridian/synic.c
+++ b/xen/arch/x86/hvm/viridian/synic.c
@@ -157,9 +157,14 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_synic) )
             return X86EMUL_EXCEPTION;
 
-        /* Vectors must be in the range 0x10-0xff inclusive */
+        /*
+         * Vectors must be in the range 0x10-0xff inclusive unless the vector
+         * is masked since Windows 11 Hyper-V (26H1) has been seen to write
+         * this MSR to its default value, despite not being a spec compliant
+         * value.
+         */
         new.as_uint64 = val;
-        if ( new.vector < 0x10 )
+        if ( new.vector < 0x10 && !new.masked )
             return X86EMUL_EXCEPTION;
 
         /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:58:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:58:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427278.1649967 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8an2-00077W-H1; Mon, 21 Sep 2026 09:58:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427278.1649967; Mon, 21 Sep 2026 09:58:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8an2-00077O-EP; Mon, 21 Sep 2026 09:58:24 +0000
Received: by outflank-mailman (input) for mailman id 1427278;
 Mon, 21 Sep 2026 09:58:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8an1-00077G-Uj
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:58:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8an1-008t6h-1w
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8an1-007usZ-2u
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=P8lGKwL71as0YgvxMRmeF+X0FMBd1maBYzxhOTXWShw=; b=UnWbZpMkavUDJnLff4cZoAcxn7
	PO8YBNywjfe176wH7a4okZUKpqM1ddKLR1oKaqhBn6DPBz7wWsbn6Iw7SKphC9RGMEeu3DyBwEgew
	1/c1QkOSVgZYF/YORatqP2NBm/v8ekcFjknuYe9MaMT0hve5Q/y/OafFgCwrj1sVeqV4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/viridian: Implement synthetic timer direct mode
Message-Id: <E1x8an1-007usZ-2u@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:58:23 +0000

commit d60f9e94af9464798cb601f4005c9f72bae7b712
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Mon Sep 21 10:11:04 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:11:04 2026 +0200

    x86/viridian: Implement synthetic timer direct mode
    
    In direct mode, the timer asserts an interrupt on expiration rather than
    using a SynIC message. It is useful to implement this since Windows 11's
    Hyper-V can only use synthetic timers in direct mode.
    
    To avoid changing behaviour in existing guests, add a new Viridian flag,
    stimer_direct, to control whether this feature is visible and usable.
    
    At the same time, check that the reserved bits are zero and the APIC
    vector is only set when using direct mode since this is enforced by
    Hyper-V (although not mentioned in the spec).
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/viridian/time.c     | 44 +++++++++++++++++++++++++++++++-----
 xen/arch/x86/hvm/viridian/viridian.c |  3 +++
 xen/include/public/hvm/params.h      |  7 +++++-
 3 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/time.c b/xen/arch/x86/hvm/viridian/time.c
index 082528dc94..65654cf969 100644
--- a/xen/arch/x86/hvm/viridian/time.c
+++ b/xen/arch/x86/hvm/viridian/time.c
@@ -223,6 +223,21 @@ static void start_stimer(struct viridian_stimer *vs)
     set_timer(&vs->timer, timeout + NOW());
 }
 
+static bool stimer_direct_mode(const struct vcpu *v,
+                               const union hv_stimer_config *config)
+{
+    return (viridian_feature_mask(v->domain) & HVMPV_stimer_direct) &&
+           config->direct_mode;
+}
+
+static void stimer_deliver_direct(struct vcpu *v, const struct viridian_stimer *vs)
+{
+    struct vlapic *vlapic = vcpu_vlapic(v);
+
+    if ( vlapic_enabled(vlapic) )
+        vlapic_set_irq(vlapic, vs->config.apic_vector, 0);
+}
+
 static void poll_stimer(struct vcpu *v, unsigned int stimerx)
 {
     struct viridian_vcpu *vv = v->arch.hvm.viridian;
@@ -242,9 +257,11 @@ static void poll_stimer(struct vcpu *v, unsigned int stimerx)
     if ( !test_bit(stimerx, &vv->stimer_pending) )
         return;
 
-    if ( !viridian_synic_deliver_timer_msg(v, vs->config.sintx,
-                                           stimerx, vs->expiration,
-                                           time_ref_count(v->domain)) )
+    if ( stimer_direct_mode(v, &vs->config) )
+        stimer_deliver_direct(v, vs);
+    else if ( !viridian_synic_deliver_timer_msg(v, vs->config.sintx,
+                                                stimerx, vs->expiration,
+                                                time_ref_count(v->domain)) )
         return;
 
     clear_bit(stimerx, &vv->stimer_pending);
@@ -361,6 +378,7 @@ int viridian_time_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
     case HV_X64_MSR_STIMER2_CONFIG:
     case HV_X64_MSR_STIMER3_CONFIG:
     {
+        union hv_stimer_config new;
         unsigned int stimerx = (idx - HV_X64_MSR_STIMER0_CONFIG) / 2;
         struct viridian_stimer *vs =
             &array_access_nospec(vv->stimer, stimerx);
@@ -368,11 +386,21 @@ int viridian_time_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_stimer) )
             return X86EMUL_EXCEPTION;
 
+        new.as_uint64 = val;
+
+        if ( new.reserved_z0 || new.reserved_z1 )
+            return X86EMUL_EXCEPTION;
+
+        if ( stimer_direct_mode(v, &new) ?
+             new.apic_vector < 0x10 : new.apic_vector )
+            return X86EMUL_EXCEPTION;
+
         stop_stimer(vs);
 
         vs->config.as_uint64 = val;
 
-        if ( !vs->config.sintx || !vs->count )
+        if ( (!stimer_direct_mode(v, &vs->config) && !vs->config.sintx) ||
+             !vs->count )
             vs->config.enable = 0;
 
         if ( vs->config.enable )
@@ -583,8 +611,12 @@ void viridian_time_load_vcpu_ctxt(
 
         vs->config.as_uint64 = ctxt->stimer_config_msr[i];
         vs->count = ctxt->stimer_count_msr[i];
-        if ( !vs->config.sintx || !vs->count )
-            /* Reject enabling with a zero sintx or count fields. */
+        if ( (!stimer_direct_mode(v, &vs->config) && !vs->config.sintx) ||
+             !vs->count )
+            /*
+             * Reject enabling with a zero sintx (if not using direct mode) or
+             * zero count field.
+             */
             vs->config.enable = 0;
     }
 }
diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c
index 90e749ceb5..90be5842b9 100644
--- a/xen/arch/x86/hvm/viridian/viridian.c
+++ b/xen/arch/x86/hvm/viridian/viridian.c
@@ -78,6 +78,7 @@ typedef union _HV_CRASH_CTL_REG_CONTENTS
 #define CPUID3D_CPU_DYNAMIC_PARTITIONING (1 << 3)
 #define CPUID3D_CRASH_MSRS (1 << 10)
 #define CPUID3D_SINT_POLLING (1 << 17)
+#define CPUID3D_STIMER_DIRECT_MODE (1 << 19)
 
 /* Viridian CPUID leaf 4: Implementation Recommendations. */
 #define CPUID4A_HCALL_REMOTE_TLB_FLUSH (1 << 2)
@@ -185,6 +186,8 @@ void cpuid_viridian_leaves(const struct vcpu *v, uint32_t leaf,
             res->d |= CPUID3D_CRASH_MSRS;
         if ( viridian_feature_mask(d) & HVMPV_synic )
             res->d |= CPUID3D_SINT_POLLING;
+        if ( viridian_feature_mask(d) & HVMPV_stimer_direct )
+            res->d |= CPUID3D_STIMER_DIRECT_MODE;
 
         break;
     }
diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index 99c40b4287..4db5142970 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -159,6 +159,10 @@
 #define _HVMPV_cpu_hotplug 12
 #define HVMPV_cpu_hotplug (1 << _HVMPV_cpu_hotplug)
 
+/* Enable STIMER direct mode */
+#define _HVMPV_stimer_direct 13
+#define HVMPV_stimer_direct (1 << _HVMPV_stimer_direct)
+
 #define HVMPV_feature_mask \
         (HVMPV_base_freq | \
          HVMPV_no_freq | \
@@ -172,7 +176,8 @@
          HVMPV_hcall_ipi | \
          HVMPV_ex_processor_masks | \
          HVMPV_no_vp_limit | \
-         HVMPV_cpu_hotplug)
+         HVMPV_cpu_hotplug | \
+         HVMPV_stimer_direct)
 
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:58:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:58:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427279.1649972 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anC-0007Ak-IW; Mon, 21 Sep 2026 09:58:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427279.1649972; Mon, 21 Sep 2026 09:58:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anC-0007Aa-Ft; Mon, 21 Sep 2026 09:58:34 +0000
Received: by outflank-mailman (input) for mailman id 1427279;
 Mon, 21 Sep 2026 09:58:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8anC-0007AU-1E
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:58:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anB-008t6n-2D
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anB-007vbf-3B
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=JjqziNcLL6F++m8Fx9Q5NtfbVaDPqHT6Giqkw4oy9jc=; b=meXuwrhjHKk6wjZTNGH7v/lrhd
	PaNjA3EY1nm4JWQ7M2eLwHpKkqN80Y1EStAPG+1Uh8rnzxy2vnsUfhh4wx1EwZPPrXJW3FKkvrqfv
	9MgYgFQRpcL++/ZnGEIRAso40kC/xPc+w3p0KBsVdG0iWmyp9VJ8/k763+VfxmJXLG1s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/svm: Intercept CR0 writes selectively
Message-Id: <E1x8anB-007vbf-3B@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:58:33 +0000

commit 1b2f3cbc09885d7b31298f11daddaadbe59ed71d
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Mon Sep 21 10:11:27 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:11:27 2026 +0200

    x86/svm: Intercept CR0 writes selectively
    
    Since 3356d685dbda ("x86/svm: Remove lazy FPU support"), Xen does not
    need to track when the TS or MP bits change so opt to intercept CR0
    writes selectively. Aside from potentially reducing a few VMEXITs, this
    fixes a nested virt bug where L1 intercepts CR0_SEL_WRITE and L0
    intercepts CR0_WRITE. The hardware prioritizes CR0_WRITE and so L1 never
    sees any CR0 writes.
    
    Since CR0 TS/MP bits may now change behind Xen's back, sync CR0 on
    VMEXIT so that the emulator sees the correct values.
    
    Shadow mode continues to use the full CR0_WRITE intercept since with
    Shadow the CR0 in the VMCB is not the same as the value Xen tracks on
    behalf of the guest and allowing the guest to change one of them
    directly would be fragile.
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/svm/svm.c  | 7 ++++++-
 xen/arch/x86/hvm/svm/vmcb.c | 7 +++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index b5fc459e62..e6a0edcf71 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1640,7 +1640,8 @@ static void svm_vmexit_do_cr_access(
 {
     int gp, cr, dir, rc;
 
-    cr = vmcb->exitcode - VMEXIT_CR0_READ;
+    cr = (vmcb->exitcode == VMEXIT_CR0_SEL_WRITE)
+         ? 16 : (vmcb->exitcode - VMEXIT_CR0_READ);
     dir = (cr > 15);
     cr &= 0xf;
     gp = vmcb->ei.mov_cr.gpr;
@@ -2519,7 +2520,10 @@ void asmlinkage svm_vmexit_handler(void)
 
     v->arch.hvm.guest_cr[2] = vmcb_get_cr2(vmcb);
     if ( paging_mode_hap(v->domain) )
+    {
+        v->arch.hvm.guest_cr[0] = vmcb_get_cr0(vmcb);
         v->arch.hvm.guest_cr[3] = v->arch.hvm.hw_cr[3] = vmcb_get_cr3(vmcb);
+    }
 
     if ( nestedhvm_enabled(v->domain) && nestedhvm_vcpu_in_guestmode(v) )
         vcpu_guestmode = 1;
@@ -2883,6 +2887,7 @@ void asmlinkage svm_vmexit_handler(void)
 
     case VMEXIT_CR0_READ ... VMEXIT_CR15_READ:
     case VMEXIT_CR0_WRITE ... VMEXIT_CR15_WRITE:
+    case VMEXIT_CR0_SEL_WRITE:
         if ( cpu_has_svm_decode && vmcb->ei.mov_cr.mov_insn )
             svm_vmexit_do_cr_access(vmcb, regs);
         else if ( !hvm_emulate_one_insn(x86_insn_is_cr_access, "CR access") )
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 975a1eaef8..d069280a4d 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -154,6 +154,13 @@ static int construct_vmcb(struct vcpu *v)
         vmcb->_cr_intercepts &=
             ~(CR_INTERCEPT_CR3_READ|CR_INTERCEPT_CR3_WRITE);
 
+        /*
+         * Xen is not interested in changes to the MP and TS bits so use
+         * CR0_SEL_WRITE to avoid unnecessary intercepts.
+         */
+        vmcb->_cr_intercepts &= ~CR_INTERCEPT_CR0_WRITE;
+        vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_CR0_SEL_WRITE;
+
         /*
          * No point in intercepting INVLPG if we don't have shadow pagetables
          * that need to be fixed up.
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:58:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:58:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427280.1649976 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anM-0007Cp-Jx; Mon, 21 Sep 2026 09:58:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427280.1649976; Mon, 21 Sep 2026 09:58:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anM-0007Ch-HL; Mon, 21 Sep 2026 09:58:44 +0000
Received: by outflank-mailman (input) for mailman id 1427280;
 Mon, 21 Sep 2026 09:58:44 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8anM-0007Cb-3n
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:58:44 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anL-008t7A-2T
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anM-007wBf-0D
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ZzIhfosgcYBLddHiTmobDe+V3axVVO11hKs5C2FQIao=; b=nzSLGCcqpZ0emFdtX730a63G5n
	n+8/SJiT+R5gHGZVAdEXkFTwxpknnvKtPI+Q7hm6u7f+jrP21kRRUQCqXpRaWZL3/x6TBSrnrT2u9
	D4nljGJu1jFAQPblMdiahEi0tXPjyBHmfkDsQLhN/1mcET1qsRBrKCIrPr+EGclXl3oI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/sched: rtds: add global-EDF utilization admission control
Message-Id: <E1x8anM-007wBf-0D@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:58:44 +0000

commit 5772eaafe34b9b92f27aced1b671454fcf371c5e
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:12:39 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: add global-EDF utilization admission control
    
    RTDS has no admission control: nothing stops the sum of all admitted
    units' (budget/period) reservations in a cpupool from exceeding
    what its pCPUs can actually provide. Once that happens, none of the
    EDF deadline guarantees this scheduler is built around still hold
    for the units sharing that pool.
    
    Introduce admission control to prevent this: reject a reservation
    whenever admitting it would push a cpupool's units over its capacity.
    Track a running utilization total per cpupool, and enforce it in
    rt_alloc_udata()/rt_free_udata(), the paired lifecycle hooks for a
    unit's creation and destruction. This catches the default
    period/budget every new unit gets.
    
    Utilization is represented as a fixed-point value: budget is
    left shifted by RTDS_UTIL_SHIFT (20 bits) and divided by period.
    A plain "(budget << RTDS_UTIL_SHIFT) / period" risks overflowing
    the multiply for large enough budgets. Rather than widen the
    arithmetic to tolerate any input, the input itself is bounded:
    rt_validate_params() rejects any budget above RTDS_MAX_BUDGET,
    chosen as the largest value that can be left-shifted by
    RTDS_UTIL_SHIFT without overflowing 64 bits, so the shift in
    rt_unit_utilization() can never overflow.
    
    A cpupool's capacity rt_utilization_cap() scales with the number of
    scheduling resources in it. It is calculated as:
    (number of sched_resources * RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100),
    where RTDS_UTIL_CAP_PCT controls how much of that capacity can
    actually be reserved; at 100% (its current value), all of it can be.
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 104 insertions(+), 1 deletion(-)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 0e9f04ea72..ff561ec1c9 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -114,6 +114,24 @@
  */
 #define RTDS_MAX_PRIORITY_LEVEL (~0U)
 
+/*
+ * Fixed-point scale for utilization (budget/period)
+ */
+#define RTDS_UTIL_SHIFT     20
+#define RTDS_UTIL_SCALE     (1ULL << RTDS_UTIL_SHIFT)
+
+/*
+ * Largest budget safe to left-shift by RTDS_UTIL_SHIFT without
+ * overflowing 64 bits. Enforced in rt_validate_params().
+ */
+#define RTDS_MAX_BUDGET_BITS  (64 - RTDS_UTIL_SHIFT)
+#define RTDS_MAX_BUDGET       ((1ULL << RTDS_MAX_BUDGET_BITS) - 1)
+
+/*
+ * % of a cpupool's sched_resource capacity admitted units may sum up to.
+ */
+#define RTDS_UTIL_CAP_PCT   100
+
 /*
  * UPDATE_LIMIT_SHIFT: a constant used in rt_update_deadline(). When finding
  * the next deadline, performing addition could be faster if the difference
@@ -195,6 +213,9 @@ struct rt_private {
     struct list_head replq;     /* ordered list of units that need replenishment */
 
     cpumask_t tickled;          /* cpus been tickled */
+
+    /* Sum of admitted units' (budget/period), scaled by RTDS_UTIL_SCALE */
+    uint64_t utilization;
 };
 
 /*
@@ -635,6 +656,54 @@ replq_reinsert(const struct scheduler *ops, struct rt_unit *svc)
         set_timer(&rt_priv(ops)->repl_timer, rearm_svc->cur_deadline);
 }
 
+/*
+ * budget << RTDS_UTIL_SHIFT can't overflow: rt_validate_params()
+ * caps budget at RTDS_MAX_BUDGET. period == 0 means "no
+ * reservation" (a unit being removed), not an error.
+ */
+static uint64_t
+rt_unit_utilization(s_time_t period, s_time_t budget)
+{
+    if ( period <= 0 )
+        return 0;
+
+    return ((uint64_t)budget << RTDS_UTIL_SHIFT) / (uint64_t)period;
+}
+
+/*
+ * Utilization capacity of the cpupool domain d resides in.
+ */
+static uint64_t
+rt_utilization_cap(const struct domain *d)
+{
+    unsigned int cpus = cpumask_weight(cpupool_domain_master_cpumask(d));
+
+    return (uint64_t)cpus * RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
+}
+
+/*
+ * Replaces a unit's reservation and updates prv->utilization
+ * to match. Growth that would push utilization over the
+ * cpupool's cap is refused. Removing a unit or shrinking
+ * a unit's reservation always succeed.
+ */
+static bool
+rt_try_set_utilization(struct rt_private *prv, const struct domain *d,
+                       s_time_t old_period, s_time_t old_budget,
+                       s_time_t new_period, s_time_t new_budget)
+{
+    uint64_t old_util = rt_unit_utilization(old_period, old_budget);
+    uint64_t new_util = rt_unit_utilization(new_period, new_budget);
+    uint64_t total    = prv->utilization - old_util + new_util;
+
+    if ( new_util > old_util && total > rt_utilization_cap(d) )
+        return false;
+
+    prv->utilization = total;
+
+    return true;
+}
+
 /*
  * Pick a valid resource for the unit vc
  * Valid resource of an unit is intesection of unit's affinity
@@ -864,6 +933,7 @@ rt_free_domdata(const struct scheduler *ops, void *data)
 static void * cf_check
 rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
 {
+    struct rt_private *prv = rt_priv(ops);
     struct rt_unit *svc;
 
     /* Allocate per-UNIT info */
@@ -881,9 +951,30 @@ rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
     __set_bit(__RTDS_extratime, &svc->flags);
     svc->priority_level = 0;
     svc->period = RTDS_DEFAULT_PERIOD;
+
     if ( !is_idle_unit(unit) )
+    {
+        unsigned long flags;
+        bool admitted;
+
         svc->budget = RTDS_DEFAULT_BUDGET;
 
+        spin_lock_irqsave(&prv->lock, flags);
+        admitted = rt_try_set_utilization(prv, unit->domain, 0, 0,
+                                          svc->period, svc->budget);
+        spin_unlock_irqrestore(&prv->lock, flags);
+
+        if ( !admitted )
+        {
+            printk(XENLOG_WARNING
+                   "RTDS: ADMISSION CONTROL: refusing unit %u of d%d,"
+                   " would exceed utilization capacity of the cpupool\n",
+                   unit->unit_id, unit->domain->domain_id);
+            xfree(svc);
+            return NULL;
+        }
+    }
+
     SCHED_STAT_CRANK(unit_alloc);
 
     return svc;
@@ -892,8 +983,19 @@ rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
 static void cf_check
 rt_free_udata(const struct scheduler *ops, void *priv)
 {
+    struct rt_private *prv = rt_priv(ops);
     struct rt_unit *svc = priv;
 
+    if ( svc && !is_idle_unit(svc->unit) )
+    {
+        unsigned long flags;
+
+        spin_lock_irqsave(&prv->lock, flags);
+        rt_try_set_utilization(prv, svc->unit->domain,
+                               svc->period, svc->budget, 0, 0);
+        spin_unlock_irqrestore(&prv->lock, flags);
+    }
+
     xfree(svc);
 }
 
@@ -1389,7 +1491,8 @@ rt_validate_params(const struct xen_domctl_sched_rtds *rtds,
     s_time_t b = MICROSECS(rtds->budget);
 
     if ( p < RTDS_MIN_PERIOD || p > RTDS_MAX_PERIOD ||
-         b < RTDS_MIN_BUDGET || b > p )
+         b < RTDS_MIN_BUDGET || b > p ||
+         b > (s_time_t)RTDS_MAX_BUDGET )
         return -EINVAL;
 
     *period = p;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:58:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:58:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427281.1649980 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anW-0007F7-LP; Mon, 21 Sep 2026 09:58:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427281.1649980; Mon, 21 Sep 2026 09:58:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anW-0007Ey-Ii; Mon, 21 Sep 2026 09:58:54 +0000
Received: by outflank-mailman (input) for mailman id 1427281;
 Mon, 21 Sep 2026 09:58:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8anW-0007Es-6S
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:58:54 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anV-008t7E-2j
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anW-007x0L-0T
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:58:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=iME1u3ODZCblNXfC9OJA7HRCFk57WXPHRKwcEuIPN+w=; b=5+dazZSiiNVG7rqygHrQeQBjpc
	yMq3vLX1oIAdOpI+AbK22PBteTdWq+E/Ph2DAZh0xRZyq6stjqKP5Fr1MDbaYBfTKIIkk6imqCEli
	uNF/WRDocSHKbsuGnJ/HsFFIOD8zazvg2XpK2itkGw5PfiTwkH3vmlmWN+p/VkzfOf9A=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/sched: rtds: enforce admission control in xl sched-rtds
Message-Id: <E1x8anW-007x0L-0T@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:58:54 +0000

commit 38e3acece28600313de92f1ff308cfa71675aa2e
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:12:58 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: enforce admission control in xl sched-rtds
    
    Now that we have introduced admission control for new and
    removed units. Extend it to XEN_DOMCTL_SCHEDOP_putinfo and
    putvcpuinfo, so growing an existing reservation via
    xl sched-rtds is checked too.
    
    putinfo sets the same (period, budget) for every unit of a
    domain at once, so it tests the whole domain's utilization
    delta atomically, rather than unit-by-unit, which could
    spuriously reject an overall-acceptable change depending on
    iteration order.
    
    putvcpuinfo changes one unit at a time, so it just calls
    rt_try_set_utilization() directly.
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index ff561ec1c9..9f7cd1aea7 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -1527,11 +1527,43 @@ rt_dom_cntl(
         op->u.rtds.budget = RTDS_DEFAULT_BUDGET / MICROSECS(1);
         break;
     case XEN_DOMCTL_SCHEDOP_putinfo:
+    {
+        uint64_t dom_old_util = 0, new_util, new_total;
+        unsigned int nr_units = 0;
+
         rc = rt_validate_params(&op->u.rtds, &period, &budget);
         if ( rc )
             break;
 
+        new_util = rt_unit_utilization(period, budget);
+
         spin_lock_irqsave(&prv->lock, flags);
+
+        /*
+         * Same (period, budget) for every unit of d: test and commit
+         * the domain's whole utilization delta atomically, rather
+         * than unit-by-unit, which could spuriously reject an
+         * overall-acceptable change depending on iteration order.
+         */
+        for_each_sched_unit ( d, unit )
+        {
+            svc = rt_unit(unit);
+            dom_old_util += rt_unit_utilization(svc->period, svc->budget);
+            nr_units++;
+        }
+
+        new_total = prv->utilization - dom_old_util +
+                    (uint64_t)nr_units * new_util;
+
+        if ( new_total > prv->utilization && new_total > rt_utilization_cap(d) )
+        {
+            spin_unlock_irqrestore(&prv->lock, flags);
+            rc = -ENOSPC;
+            break;
+        }
+
+        prv->utilization = new_total;
+
         for_each_sched_unit ( d, unit )
         {
             svc = rt_unit(unit);
@@ -1540,6 +1572,7 @@ rt_dom_cntl(
         }
         spin_unlock_irqrestore(&prv->lock, flags);
         break;
+    }
     case XEN_DOMCTL_SCHEDOP_getvcpuinfo:
     case XEN_DOMCTL_SCHEDOP_putvcpuinfo:
         while ( index < op->u.v.nr_vcpus )
@@ -1584,6 +1617,15 @@ rt_dom_cntl(
 
                 spin_lock_irqsave(&prv->lock, flags);
                 svc = rt_unit(d->vcpu[local_sched.vcpuid]->sched_unit);
+
+                if ( !rt_try_set_utilization(prv, d, svc->period, svc->budget,
+                                              period, budget) )
+                {
+                    spin_unlock_irqrestore(&prv->lock, flags);
+                    rc = -ENOSPC;
+                    break;
+                }
+
                 svc->period = period;
                 svc->budget = budget;
                 if ( local_sched.u.rtds.flags & XEN_DOMCTL_SCHEDRT_extra )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:59:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:59:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427282.1649984 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ang-0007H2-Mm; Mon, 21 Sep 2026 09:59:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427282.1649984; Mon, 21 Sep 2026 09:59:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ang-0007Gt-K0; Mon, 21 Sep 2026 09:59:04 +0000
Received: by outflank-mailman (input) for mailman id 1427282;
 Mon, 21 Sep 2026 09:59:04 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8ang-0007Gn-8x
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:59:04 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anf-008t9z-2z
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ang-007xpY-0j
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=M7LbkXB1rtMBm/RWcVVxAyRoRJnAYxwkuYlgtpuEnnA=; b=61CEyWE/HnXUZfxWFNwhjopZ+a
	phkrVZT0fh5r6aQYa4dsyWsoQ7H1/cM1Bat9bRvoV3EtYCJl2YO7xLRG3dV26mOJ8zXI1koQR6xZ8
	J+LYn3Y9Emuus++/g0nDv2WNeeaxACevcu4veqU32IEDc1GyplYhZuea/wZ8IHZ+1YBc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/sched: rtds: report utilization and cap via debug key
Message-Id: <E1x8ang-007xpY-0j@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:59:04 +0000

commit 5f7bfb20cd726dab78fa6bca71aa8230d5cfd812
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:13:14 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: report utilization and cap via debug key
    
    Print a cpupool's admitted utilization against its capacity in the
    'r' debug ky (xl debug-keys r), so an operator can see the total
    usage of a cpupool.
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 9f7cd1aea7..2e4312a7dd 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -399,12 +399,22 @@ rt_dump(const struct scheduler *ops)
     const struct rt_unit *svc;
     const struct rt_dom *sdom;
     unsigned long flags;
+    uint64_t cap;
 
     spin_lock_irqsave(&prv->lock, flags);
 
     if ( list_empty(&prv->sdom) )
         goto out;
 
+    cap = (uint64_t)cpumask_weight(ops->cpupool->res_valid) *
+          RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
+
+    if ( cap )
+        printk("Utilization: %llu%% of capacity\n",
+               (unsigned long long)(prv->utilization * 100 / cap));
+    else
+        printk("Utilization: cpupool has no capacity\n");
+
     runq = rt_runq(ops);
     depletedq = rt_depletedq(ops);
     replq = rt_replq(ops);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:59:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:59:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427283.1649988 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anq-0007Kb-PM; Mon, 21 Sep 2026 09:59:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427283.1649988; Mon, 21 Sep 2026 09:59:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8anq-0007KT-Ml; Mon, 21 Sep 2026 09:59:14 +0000
Received: by outflank-mailman (input) for mailman id 1427283;
 Mon, 21 Sep 2026 09:59:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8anq-0007KN-Bz
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:59:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anq-008tA8-04
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8anq-007yc3-11
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=yDNJ/IgtkK7oJX+qGY1v7P83QzJ++EY2GGvywCT7TjE=; b=yQ0nN0az/i1RAH5tYn6iIpa9jD
	i4oK0C7WbJZJCL/xII2y88KKo/TF1BqS+l8MU/z90xLf1X3lmuwrllWzJ7ilMTkMXlBAjxzhrQvIb
	erWe0uJKiPT8HeQnBfFTxRT/p2KYAWu+Vsjx2ajfD2vMrNDt8FIZQRFPE7oGfJ7cD59o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/sched: rtds: make admission control cpupool-wide toggleable
Message-Id: <E1x8anq-007yc3-11@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:59:14 +0000

commit 04584da7920512451ef00e7168c12947d262f259
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:13:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: make admission control cpupool-wide toggleable
    
    Add a per-cpupool on/off switch for RTDS admission control via
    XEN_SYSCTL_scheduler_op, enabled by default, so an operator can
    disable/enable enforcement for a pool
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c       | 57 +++++++++++++++++++++++++++++++++++++++++----
 xen/include/public/sysctl.h |  5 ++++
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 2e4312a7dd..f3f1a7c2b6 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -216,6 +216,8 @@ struct rt_private {
 
     /* Sum of admitted units' (budget/period), scaled by RTDS_UTIL_SCALE */
     uint64_t utilization;
+
+    bool admission_control_enabled; /* on/off flag for admission control. */
 };
 
 /*
@@ -409,6 +411,9 @@ rt_dump(const struct scheduler *ops)
     cap = (uint64_t)cpumask_weight(ops->cpupool->res_valid) *
           RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
 
+    printk("Admission control: %s\n",
+            prv->admission_control_enabled ? "enabled" : "disabled");
+
     if ( cap )
         printk("Utilization: %llu%% of capacity\n",
                (unsigned long long)(prv->utilization * 100 / cap));
@@ -694,8 +699,8 @@ rt_utilization_cap(const struct domain *d)
 /*
  * Replaces a unit's reservation and updates prv->utilization
  * to match. Growth that would push utilization over the
- * cpupool's cap is refused. Removing a unit or shrinking
- * a unit's reservation always succeed.
+ * cpupool's cap is refused if admission control is enabled.
+ * Removing a unit or shrinking a unit's reservation always succeed.
  */
 static bool
 rt_try_set_utilization(struct rt_private *prv, const struct domain *d,
@@ -706,7 +711,8 @@ rt_try_set_utilization(struct rt_private *prv, const struct domain *d,
     uint64_t new_util = rt_unit_utilization(new_period, new_budget);
     uint64_t total    = prv->utilization - old_util + new_util;
 
-    if ( new_util > old_util && total > rt_utilization_cap(d) )
+    if ( prv->admission_control_enabled &&
+         new_util > old_util && total > rt_utilization_cap(d) )
         return false;
 
     prv->utilization = total;
@@ -773,6 +779,7 @@ rt_init(struct scheduler *ops)
     INIT_LIST_HEAD(&prv->runq);
     INIT_LIST_HEAD(&prv->depletedq);
     INIT_LIST_HEAD(&prv->replq);
+    prv->admission_control_enabled = true;
 
     ops->sched_data = prv;
     rc = 0;
@@ -1565,8 +1572,14 @@ rt_dom_cntl(
         new_total = prv->utilization - dom_old_util +
                     (uint64_t)nr_units * new_util;
 
-        if ( new_total > prv->utilization && new_total > rt_utilization_cap(d) )
+        if ( prv->admission_control_enabled &&
+             new_total > prv->utilization && new_total > rt_utilization_cap(d) )
         {
+            printk(XENLOG_WARNING
+                   "RTDS: ADMISSION CONTROL: refusing d%d,"
+                   " would exceed utilization capacity of the cpupool\n",
+                   d->domain_id);
+
             spin_unlock_irqrestore(&prv->lock, flags);
             rc = -ENOSPC;
             break;
@@ -1631,6 +1644,11 @@ rt_dom_cntl(
                 if ( !rt_try_set_utilization(prv, d, svc->period, svc->budget,
                                               period, budget) )
                 {
+                    printk(XENLOG_WARNING
+                           "RTDS: ADMISSION CONTROL: refusing vcpu %u of d%d,"
+                           " would exceed utilization capacity of the cpupool\n",
+                           local_sched.vcpuid, d->domain_id);
+
                     spin_unlock_irqrestore(&prv->lock, flags);
                     rc = -ENOSPC;
                     break;
@@ -1691,6 +1709,34 @@ rt_dom_cntl(
     return rc;
 }
 
+#ifdef CONFIG_SYSCTL
+static int cf_check
+rt_sys_cntl(const struct scheduler *ops,
+             struct xen_sysctl_scheduler_op *sc)
+{
+    struct xen_sysctl_rtds_schedule *params = &sc->u.sched_rtds;
+    struct rt_private *prv = rt_priv(ops);
+    unsigned long flags;
+
+    switch ( sc->cmd )
+    {
+    case XEN_SYSCTL_SCHEDOP_putinfo:
+        spin_lock_irqsave(&prv->lock, flags);
+        prv->admission_control_enabled = params->admission_control_enabled;
+        spin_unlock_irqrestore(&prv->lock, flags);
+        break;
+
+    case XEN_SYSCTL_SCHEDOP_getinfo:
+        spin_lock_irqsave(&prv->lock, flags);
+        params->admission_control_enabled = prv->admission_control_enabled;
+        spin_unlock_irqrestore(&prv->lock, flags);
+        break;
+    }
+
+    return 0;
+}
+#endif
+
 /*
  * The replenishment timer handler picks units
  * from the replq and does the actual replenishment.
@@ -1791,6 +1837,9 @@ static const struct sched_ops sched_rtds_def = {
     .remove_unit    = rt_unit_remove,
 
     .adjust         = rt_dom_cntl,
+#ifdef CONFIG_SYSCTL
+    .adjust_global  = rt_sys_cntl,
+#endif
 
     .pick_resource  = rt_res_pick,
     .do_schedule    = rt_schedule,
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index c7cd9b4eb0..63d0ee062b 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -814,6 +814,10 @@ struct xen_sysctl_credit2_schedule {
     uint32_t ratelimit_us;
 };
 
+struct xen_sysctl_rtds_schedule {
+    uint8_t admission_control_enabled;
+};
+
 /* XEN_SYSCTL_scheduler_op */
 /* Set or get info? */
 #define XEN_SYSCTL_SCHEDOP_putinfo 0
@@ -828,6 +832,7 @@ struct xen_sysctl_scheduler_op {
         } sched_arinc653;
         struct xen_sysctl_credit_schedule sched_credit;
         struct xen_sysctl_credit2_schedule sched_credit2;
+        struct xen_sysctl_rtds_schedule sched_rtds;
     } u;
 };
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:59:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:59:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427284.1649993 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ao1-0007OE-RJ; Mon, 21 Sep 2026 09:59:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427284.1649993; Mon, 21 Sep 2026 09:59:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8ao1-0007O6-OA; Mon, 21 Sep 2026 09:59:25 +0000
Received: by outflank-mailman (input) for mailman id 1427284;
 Mon, 21 Sep 2026 09:59:24 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8ao0-0007Nz-Ea
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:59:24 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ao0-008tAL-0J
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8ao0-007zRL-1H
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Hu++dmZFapl3xdvHasGCAUnQMjG/mdcznvYu6MpwNDc=; b=w4AnPVNvbgVM5Fi9DXZ77kzhRl
	qP4mUej5nHIIuyaMqHNCCNhkGL19EYx3IB3MTg9SDd6fd/vvYbm0KGBPjbVcriA6W0bn1oxOh+Rhh
	eGP5S69cr/DPrvH584kcIW5CN7tzjNZ/DpsyuDE0bG0fpXVdxweZleWYhXlwYjWoukh8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: add missing APLIC register offsets, masks to asm/aplic.h
Message-Id: <E1x8ao0-007zRL-1H@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:59:24 +0000

commit 60004aa6da754b37064229494da2521ffd5e5d9d
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Mon Sep 21 10:13:56 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/riscv: add missing APLIC register offsets, masks to asm/aplic.h
    
    These definitions are required for correct decoding of APLIC MMIO
    accesses and target configuration, and will be used by both the
    physical and virtual APLIC implementations.
    
    While adding them, rearrange the header in the style of x86's
    asm/msr-index.h: a register's offset is immediately followed by the
    definitions of that register's fields, with the blocks sorted by
    offset.  This makes the relation between a register and its fields
    obvious from the layout alone, so no comment is needed to express it.
    
    No functional change is intended by this patch; it only centralises
    hardware definitions that were previously missing.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/aplic.h | 90 +++++++++++++++++++++++++++++++-------
 1 file changed, 73 insertions(+), 17 deletions(-)

diff --git a/xen/arch/riscv/include/asm/aplic.h b/xen/arch/riscv/include/asm/aplic.h
index 07318aaac2..a2af55d54f 100644
--- a/xen/arch/riscv/include/asm/aplic.h
+++ b/xen/arch/riscv/include/asm/aplic.h
@@ -15,32 +15,88 @@
 
 #include <asm/imsic.h>
 
+/*
+ * APLIC register offsets and, immediately following each of them, the
+ * definitions of the fields of the respective register:
+ *
+ * #define APLIC_$NAME                      0x$OFFSET
+ * #define  APLIC_$NAME_$FIELD1             ...
+ * #define   APLIC_$NAME_$FIELD1_$VAL       ...
+ * #define  APLIC_$NAME_$FIELD2             ...
+ *
+ * Blocks of related constants are sorted by register offset.
+ */
+
+#define APLIC_CTRL_REGION_OFFSET_MASK       0x3fff
+
+#define APLIC_DOMAINCFG                     0x0000
 /*
  * domaincfg read-only fields (AIA spec):
  *  - bits [31:24] -> read-only 0x80
  *  - bit 7        -> read-only 0
  */
-#define APLIC_DOMAINCFG_RO      (0x80U << 24)
-#define APLIC_DOMAINCFG_IE      BIT(8, U)
-#define APLIC_DOMAINCFG_DM      BIT(2, U)
-#define APLIC_DOMAINCFG_BE      BIT(0, U)
+#define  APLIC_DOMAINCFG_RO             (0x80U << 24)
+#define  APLIC_DOMAINCFG_IE             BIT(8, U)
+#define  APLIC_DOMAINCFG_DM             BIT(2, U)
+#define  APLIC_DOMAINCFG_BE             BIT(0, U)
+
+#define APLIC_SOURCECFG_BASE            0x0004
+#define APLIC_SOURCECFG_LAST            0x0ffc
+/*
+ * sourcecfg[] register fields:
+ *  - bit 10 (D) selects the layout of the remaining bits;
+ *  - D = 1: bits [9:0] hold the Child Index, i.e. the source is delegated
+ *           to a child domain (unsupported by Xen);
+ *  - D = 0: bits [2:0] hold the source mode SM (WARL).
+ */
+#define  APLIC_SOURCECFG_D              BIT(10, U)
+#define  APLIC_SOURCECFG_SM             GENMASK(2, 0)
+#define   APLIC_SOURCECFG_SM_INACTIVE   0x0
+#define   APLIC_SOURCECFG_SM_DETACH     0x1
+/* Bits 0x2 and 0x3 are reserved */
+#define   APLIC_SOURCECFG_SM_EDGE_RISE  0x4
+#define   APLIC_SOURCECFG_SM_EDGE_FALL  0x5
+#define   APLIC_SOURCECFG_SM_LEVEL_HIGH 0x6
+#define   APLIC_SOURCECFG_SM_LEVEL_LOW  0x7
+
+#define APLIC_SMSICFGADDR               0x1bc8
+#define APLIC_SMSICFGADDRH              0x1bcc
+
+#define APLIC_SETIP_BASE                0x1c00
+#define APLIC_SETIP_LAST                0x1c7c
+#define APLIC_SETIPNUM                  0x1cdc
+
+#define APLIC_CLRIP_BASE                0x1d00
+#define APLIC_CLRIP_LAST                0x1d7c
+#define APLIC_CLRIPNUM                  0x1ddc
+
+#define APLIC_SETIE_BASE                0x1e00
+#define APLIC_SETIE_LAST                0x1e7c
+#define APLIC_SETIENUM                  0x1edc
+
+#define APLIC_CLRIE_BASE                0x1f00
+#define APLIC_CLRIE_LAST                0x1f7c
+#define APLIC_CLRIENUM                  0x1fdc
+
+#define APLIC_SETIPNUM_LE               0x2000
 
-#define APLIC_SOURCECFG_SM_INACTIVE     0x0
-#define APLIC_SOURCECFG_SM_DETACH       0x1
-#define APLIC_SOURCECFG_SM_EDGE_RISE    0x4
-#define APLIC_SOURCECFG_SM_EDGE_FALL    0x5
-#define APLIC_SOURCECFG_SM_LEVEL_HIGH   0x6
-#define APLIC_SOURCECFG_SM_LEVEL_LOW    0x7
+#define APLIC_GENMSI                    0x3000
 
-#define APLIC_TARGET_HART_IDX_SHIFT 18
+#define APLIC_TARGET_BASE               0x3004
+#define APLIC_TARGET_LAST               0x3ffc
+#define  APLIC_TARGET_HART_IDX          GENMASK(31, 18)
+#define  APLIC_TARGET_HART_IDX_SHIFT    18
+#define  APLIC_TARGET_GUEST_IDX         GENMASK(17, 12)
+/* Bit 11 is reserved and reads as zero */
+#define  APLIC_TARGET_EIID              GENMASK(10, 0)
 
-#define APLIC_IDC_SIZE          32
+#define APLIC_IDC_SIZE                  32
 
-#define APLIC_MIN_SIZE          0x4000
-#define APLIC_SIZE_ALIGN(x)     ROUNDUP(x, APLIC_MIN_SIZE)
+#define APLIC_MIN_SIZE                  0x4000
+#define APLIC_SIZE_ALIGN(x)             ROUNDUP(x, APLIC_MIN_SIZE)
 
-#define APLIC_SIZE(nr_cpus)     (APLIC_MIN_SIZE + \
-                                 APLIC_SIZE_ALIGN(APLIC_IDC_SIZE * (nr_cpus)))
+#define APLIC_SIZE(nr_cpus) \
+    (APLIC_MIN_SIZE + APLIC_SIZE_ALIGN(APLIC_IDC_SIZE * (nr_cpus)))
 
 struct aplic_regs {
     uint32_t domaincfg;         /* 0x0000 */
@@ -82,7 +138,7 @@ struct aplic_regs {
     uint8_t _reserved11[4088];  /* 0x2008 */
 
     uint32_t genmsi;            /* 0x3000 */
-    uint32_t target[1023];      /* 0x3008 */
+    uint32_t target[1023];      /* 0x3004 */
 };
 
 #endif /* ASM_RISCV_APLIC_H */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 09:59:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 09:59:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427285.1649996 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8aoB-0007QL-SA; Mon, 21 Sep 2026 09:59:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427285.1649996; Mon, 21 Sep 2026 09:59:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8aoB-0007QD-Pd; Mon, 21 Sep 2026 09:59:35 +0000
Received: by outflank-mailman (input) for mailman id 1427285;
 Mon, 21 Sep 2026 09:59:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8aoA-0007Q4-HE
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 09:59:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8aoA-008tAq-0a
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8aoA-0080HT-1Y
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 09:59:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Gj+NGXb4nXBotxWvD8UFJFGan5m1JNJN0yDhZkkNjqY=; b=Yg6ny6OTwACxfwMh/3AHJoresj
	Z1KQZVL0WIpKnimnj4FafTZxyBw5OADV6MYRGEFVdvxgQZ2SBz7HNlxdU19wJCnGQa1l8awG8NMoC
	APtH/tPSjBrUE+pfjKUYJy8bG5F4VEmt5Pa3dg/QfLa6oNi4bFxovdckL6ns3k4VeDbA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] docs: clarify tag sequence in sending-patches
Message-Id: <E1x8aoA-0080HT-1Y@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 09:59:34 +0000

commit fce27a1fd07fdd3ab270874846f51de45fc45d93
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Mon Sep 21 10:49:38 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:49:38 2026 +0200

    docs: clarify tag sequence in sending-patches
    
    Make clear what an "Assisted-by:" tag relates to in
    sending-patches.pandoc.
    
    Add the possibility to clarify how AI was used.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Julien Grall <julien@xen.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 docs/process/sending-patches.pandoc | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/docs/process/sending-patches.pandoc b/docs/process/sending-patches.pandoc
index b924fa2b87..2506a686bb 100644
--- a/docs/process/sending-patches.pandoc
+++ b/docs/process/sending-patches.pandoc
@@ -213,9 +213,25 @@ Basic development tools (git, gcc, make, editors) should not be listed.
 Specialised but deterministic tools may optionally be listed, but their use
 should be clear from other context in the commit message.
 
+Note that an `Assisted-by:` tag relates to the next tag mentioning a
+natural person. So if you used AI to write a patch, the `Assisted-by:` tag
+should be just before your `Signed-off-by:` tag, while if AI was used to
+find an issue the patch is fixing, the `Assisted-by:` tag should be
+before the `Reported-by:` tag naming the reporter of the issue.
+
+The `Assisted-by:` tag can be followed by an optional comment mentioning
+in which part of the process AI was used, e.g.:
+
+    Assisted-by: Chat-GPT # commit message
+
+This allows even to list multiple different AI models used for different
+use cases, including the use of AI for finding an issue and the creating
+a patch for fixing it.
+
 Example:
 
-    Assisted-by: Claude:claude-3-opus
+    Assisted-by: sashiko-bot # finding the issue
+    Assisted-by: Claude:claude-3-opus # patch creation
 
 ### Signed-off-by:
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:22:08 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:22:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427505.1650223 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dy8-0003FU-Rj; Mon, 21 Sep 2026 13:22:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427505.1650223; Mon, 21 Sep 2026 13:22:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dy8-0003FM-Ot; Mon, 21 Sep 2026 13:22:04 +0000
Received: by outflank-mailman (input) for mailman id 1427505;
 Mon, 21 Sep 2026 13:22:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dy7-0003FG-5F
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:22:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dy6-008xRr-1Y
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dy6-008e1x-2T
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5wqIuID0oaz3jwFQTC1aR1TJcNQX0vVQ/gxfMlhmgzQ=; b=ovnhHuD4PVcFfBBRazGTLbGD5R
	RvD0nrUxFz+GSvd1tAQkApNZ1ZXXrj8/pmFD6GM36fMuBTxBbTBgEA7psDcF3SqliYOryByFwbulE
	g3JZI4ii3olLZDiuL0zgMPc5uTjzxTHx6iWHnP2AtEr33DwSazInrYm6BzTj81BwmZNs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/sched: core: skip missing vcpu slots in sched_move_domain()
Message-Id: <E1x8dy6-008e1x-2T@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:22:02 +0000

commit 4835c078e5cf52fbcf842f4e8a2e61808b8ff869
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 09:54:12 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:54:12 2026 +0200

    xen/sched: core: skip missing vcpu slots in sched_move_domain()
    
    sched_move_domain() derives the number of units to rebuild from
    d->max_vcpus, which is fixed at domain creation and never rolled
    back if vcpu_create() fails partway through building a domain. So
    d->vcpu[i] can be NULL for some i even though max_vcpus still
    counts it - this happens if sched_alloc_udata() returns NULL.
    
    The per-unit loop doesn't check for this: it sets
    unit->vcpu_list = d->vcpu[unit_id] (NULL) and hands that broken
    unit straight to the destination scheduler's alloc_udata(),
    which assumes vcpu_list is always valid and crashes Xen when
    it is not.
    
    Reproduced by building a domain in a non-default cpupool where
    vcpu creation fails partway through, then destroying it.
    domain_kill() moves the domain back to the default cpupool via
    sched_move_domain() before actually destroying it, crashing
    inside the destination scheduler's alloc_udata() (seen in
    Credit2's csched2_alloc_udata() -> is_idle_unit() -> NULL deref).
    
    Before building a unit in sched_move_domain(), check whether all
    vpcu slots belonging to that unit are populated. If any of its
    vpcus is missing:
     - For a dying domain, skip the unit allocation.
     - For an active domain, abort the move and return -EINVAL to
       prevent running with dropped vCPUs.
    
    Fixes: 70fadc41635b ("xen/cpupool: support moving domain between cpupools with different granularity")
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/core.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index ee24cc28f6..17e7f52169 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -745,6 +745,38 @@ int sched_move_domain(struct domain *d, struct cpupool *c)
 
     for ( unit_idx = 0; unit_idx < n_units; unit_idx++ )
     {
+        /*
+         * A vcpu slot can be missing if creation failed partway
+         * through. A dying domain is being torn down regardless, so
+         * skip the unit -- but a domain that isn't dying still needs
+         * every vcpu it has schedulable, so fail instead of silently
+         * dropping some of them.
+         */
+        bool vcpu_failed = false;
+
+        for ( unsigned int i = 0;
+              i < gran && unit_idx * gran + i < d->max_vcpus; i++ )
+        {
+            if ( !d->vcpu[unit_idx * gran + i] )
+            {
+                vcpu_failed = true;
+                break;
+            }
+        }
+
+        if ( vcpu_failed )
+        {
+            if ( !d->is_dying )
+            {
+                sched_move_domain_cleanup(c->sched, new_units, domdata);
+                rcu_read_unlock(&sched_res_rculock);
+
+                return -EINVAL;
+            }
+
+            continue;
+        }
+
         unit = sched_alloc_unit_mem();
         if ( unit )
         {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:22:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:22:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427507.1650227 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyI-0003Ir-Sv; Mon, 21 Sep 2026 13:22:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427507.1650227; Mon, 21 Sep 2026 13:22:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyI-0003Ik-QH; Mon, 21 Sep 2026 13:22:14 +0000
Received: by outflank-mailman (input) for mailman id 1427507;
 Mon, 21 Sep 2026 13:22:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dyG-0003Ib-Uq
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyG-008xS1-1v
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyG-008fM7-2s
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=GD2He08dII9DMiObFBG9hA8n4WDl62beusd3Vieo/iY=; b=IfPDw5L8Z3HDeFUmdrFP1dyFaV
	HCPf3HaOIORoWTYS5FIwlMzTBGsoGeb9eZT1Ahqfw3SRj/v0Auf6UFyBd53tr1vWRTXKtc1tXPW8A
	1n3sD/uow+x5CCAoBiRflTHDKXF1GRDAR3qX15CNx21Qd16zDzwJtxxDIgNhF8x1a0Q8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86: always park offline CPUs
Message-Id: <E1x8dyG-008fM7-2s@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:22:12 +0000

commit b0597289ebf89cda98d57f80014c633b9be18140
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 09:57:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:57:22 2026 +0200

    x86: always park offline CPUs
    
    While on AMD (or Hygon) CPUs the situation isn't as bad wrt broadcasting
    of #MC, some "multicast" can still happen. Therefore the reasoning to park
    CPUs rather than fully offlining them applies everywhere.
    
    Don't retain the dependency on the "mce=" cmdline option either: That
    option may best be dropped as well, as not enabling MCE will result in a
    shutdown when #MC would otherwise be raised.
    
    Drop the global variable, using a #define (just like common code does)
    instead. Outside of common code, simplify expressions / code accordingly.
    (In common code we still have to cater for x86 wanting it different from
    everyone else.)
    
    Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/acpi/cpu_idle.c      | 4 ++--
 xen/arch/x86/cpu/common.c         | 3 ---
 xen/arch/x86/cpu/mcheck/mce.c     | 9 +--------
 xen/arch/x86/genapic/x2apic.c     | 6 +-----
 xen/arch/x86/include/asm/percpu.h | 2 +-
 xen/arch/x86/include/asm/smp.h    | 6 ------
 xen/arch/x86/mpparse.c            | 8 ++------
 xen/arch/x86/setup.c              | 3 +--
 xen/arch/x86/smp.c                | 4 +---
 xen/arch/x86/smpboot.c            | 4 +---
 xen/include/xen/percpu.h          | 2 +-
 11 files changed, 11 insertions(+), 40 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 1a749fabd2..56b22a2ff3 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -436,7 +436,7 @@ static void cf_check dump_cx(unsigned char key)
 
         if ( cpu_online(cpu) )
             print_acpi_power(cpu, power);
-        else if ( park_offline_cpus )
+        else
             printk("CPU%u parked in state %u (C%u)\n", cpu,
                    power->last_state ? power->last_state->idx : 1,
                    power->last_state ? power->last_state->type : 1);
@@ -1360,7 +1360,7 @@ long set_cx_pminfo(uint32_t acpi_id, struct xen_processor_power *power)
          * If we've just learned of more available C states, wake the CPU if
          * it's parked, so it can go back to sleep in perhaps a deeper state.
          */
-        if ( park_offline_cpus && apic_id != BAD_APICID )
+        if ( apic_id != BAD_APICID )
         {
             unsigned long flags;
 
diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index d045ed6b41..43785d19cc 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -443,9 +443,6 @@ void __init early_cpu_init(bool verbose)
 	 * here.
 	 */
 
-	if (!(c->vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
-		park_offline_cpus = opt_mce;
-
 	/*
 	 * If nominal freq isn't available, use highest, thus causing NOW()
 	 * output to move more slowly.  See preset_tsc_scale().
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index 64fa66f026..1888f22d15 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -716,15 +716,8 @@ static int cf_check cpu_callback(
         rc = cpu_bank_alloc(cpu);
         break;
 
-    case CPU_UP_CANCELED:
-    case CPU_DEAD:
-        if ( !park_offline_cpus )
-            cpu_bank_free(cpu);
-        break;
-
     case CPU_REMOVE:
-        if ( park_offline_cpus )
-            cpu_bank_free(cpu);
+        cpu_bank_free(cpu);
         break;
     }
 
diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c
index 5f2765cf14..ca88593d0f 100644
--- a/xen/arch/x86/genapic/x2apic.c
+++ b/xen/arch/x86/genapic/x2apic.c
@@ -181,12 +181,8 @@ static int cf_check update_clusterinfo(
              !cond_alloc_cpumask_var(&per_cpu(scratch_mask, cpu)) )
             err = -ENOMEM;
         break;
-    case CPU_UP_CANCELED:
-    case CPU_DEAD:
+
     case CPU_REMOVE:
-        if ( park_offline_cpus == (action != CPU_REMOVE) ||
-             system_state == SYS_STATE_suspend )
-            break;
         if ( per_cpu(cluster_cpus, cpu) )
         {
             cpumask_clear_cpu(cpu, per_cpu(cluster_cpus, cpu));
diff --git a/xen/arch/x86/include/asm/percpu.h b/xen/arch/x86/include/asm/percpu.h
index 34f589f990..fe3df03c4c 100644
--- a/xen/arch/x86/include/asm/percpu.h
+++ b/xen/arch/x86/include/asm/percpu.h
@@ -1,7 +1,7 @@
 #ifndef __X86_PERCPU_H__
 #define __X86_PERCPU_H__
 
-#define PARK_OFFLINE_CPUS_VAR
+#define park_offline_cpus true
 
 /*
  * Force uses of per_cpu() with an invalid area to attempt to access the
diff --git a/xen/arch/x86/include/asm/smp.h b/xen/arch/x86/include/asm/smp.h
index 3f16e62696..572b39b01c 100644
--- a/xen/arch/x86/include/asm/smp.h
+++ b/xen/arch/x86/include/asm/smp.h
@@ -25,12 +25,6 @@ DECLARE_PER_CPU(cpumask_var_t, scratch_cpumask);
 DECLARE_PER_CPU(cpumask_var_t, hpet_scratch_cpumask);
 DECLARE_PER_CPU(cpumask_var_t, send_ipi_cpumask);
 
-/*
- * Do we, for platform reasons, need to actually keep CPUs online when we
- * would otherwise prefer them to be off?
- */
-extern bool park_offline_cpus;
-
 void smp_send_nmi_allbutself(void);
 
 void send_IPI_mask(const cpumask_t *mask, int vector);
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index 1b41aa573f..3cea519152 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -80,16 +80,12 @@ void __init set_nr_cpu_ids(unsigned int max_cpus)
 	printk(XENLOG_INFO "SMP: Allowing %u CPUs (%d hotplug CPUs)\n",
 	       max_cpus, max_t(int, max_cpus - num_processors, 0));
 
-	if (!park_offline_cpus)
-		tot_cpus = max_cpus;
 	nr_cpu_ids = min(tot_cpus, NR_CPUS + 0u);
 	if (nr_cpu_ids < num_processors)
 	{
 		unaccounted_cpus = true;
-		if (park_offline_cpus)
-			printk(XENLOG_WARNING
-			       "SMP: Cannot bring up %u further CPUs\n",
-			       num_processors - nr_cpu_ids);
+		printk(XENLOG_WARNING "SMP: Cannot bring up %u further CPUs\n",
+		       num_processors - nr_cpu_ids);
 	}
 
 #ifndef nr_cpumask_bits
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 7d71fea6c0..a636e3205c 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -2144,8 +2144,7 @@ void asmlinkage __init noreturn __start_xen(void)
             /* Set up node_to_cpumask based on cpu_to_node[]. */
             numa_add_cpu(i);
 
-            if ( (park_offline_cpus || num_online_cpus() < max_cpus) &&
-                 !cpu_online(i) )
+            if ( !cpu_online(i) )
             {
                 ret = cpu_up(i);
                 if ( ret != 0 )
diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c
index 7936294f5f..ae4e5a66d7 100644
--- a/xen/arch/x86/smp.c
+++ b/xen/arch/x86/smp.c
@@ -92,9 +92,7 @@ void send_IPI_mask(const cpumask_t *mask, int vector)
     if ( system_state > SYS_STATE_smp_boot &&
          !unaccounted_cpus && !disabled_cpus && !cpu_in_hotplug_context() &&
          /* NB: get_cpu_maps lock requires enabled interrupts. */
-         local_irq_is_enabled() && (cpus_locked = get_cpu_maps()) &&
-         (park_offline_cpus ||
-          cpumask_equal(&cpu_online_map, &cpu_present_map)) )
+         local_irq_is_enabled() && (cpus_locked = get_cpu_maps()) )
         cpumask_or(scratch, mask, cpumask_of(smp_processor_id()));
     else
     {
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index cede2b886f..fb73989232 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -67,8 +67,6 @@ DEFINE_PER_CPU_READ_MOSTLY(struct stubs, stubs);
 cpumask_t cpu_online_map __read_mostly;
 EXPORT_SYMBOL(cpu_online_map);
 
-bool __read_mostly park_offline_cpus;
-
 unsigned int __read_mostly nr_sockets;
 cpumask_t **__read_mostly socket_cpumask;
 static cpumask_t *secondary_socket_cpumask;
@@ -1151,7 +1149,7 @@ static int cf_check cpu_smpboot_callback(
         break;
     case CPU_UP_CANCELED:
     case CPU_DEAD:
-        cpu_smpboot_free(cpu, !park_offline_cpus);
+        cpu_smpboot_free(cpu, false);
         break;
     case CPU_REMOVE:
         cpu_smpboot_free(cpu, true);
diff --git a/xen/include/xen/percpu.h b/xen/include/xen/percpu.h
index d324671b5b..88f332caab 100644
--- a/xen/include/xen/percpu.h
+++ b/xen/include/xen/percpu.h
@@ -36,7 +36,7 @@
 #include <xen/types.h>
 #include <asm/current.h>
 
-#ifndef PARK_OFFLINE_CPUS_VAR
+#if !defined(PARK_OFFLINE_CPUS_VAR) && !defined(park_offline_cpus)
 /*
  * Do we, for platform reasons, need to actually keep CPUs online when we
  * would otherwise prefer them to be off?
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:22:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:22:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427509.1650230 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyS-0003Kp-UG; Mon, 21 Sep 2026 13:22:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427509.1650230; Mon, 21 Sep 2026 13:22:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyS-0003Kh-Rh; Mon, 21 Sep 2026 13:22:24 +0000
Received: by outflank-mailman (input) for mailman id 1427509;
 Mon, 21 Sep 2026 13:22:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dyR-0003KZ-1l
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:22:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyQ-008xSF-2F
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyQ-008gmQ-3A
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=LxBrAr3mu1y8+YB9zvkRAGTWeuN/7+NId93/f+mrdCU=; b=OqGvyuC1mdrlV0K7tCpjgqu9I/
	HsX2g2yG/1BBnXrc06GrcdCwrs08ufe/7I1qz1twnuxdaB+11AN6orLs7mqb/uDoFwuAJcEXc6DJc
	l8yUTJgyzcayIyyFuJFP1YRV0lPCn8SHURGMlopQQVogrY6Wo1vrHkfkMV5Dc/XgTHC0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/domain: address Misra rule 11.1 violation in reset_stack_and_call_ind()
Message-Id: <E1x8dyQ-008gmQ-3A@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:22:22 +0000

commit 9fd71d225729fd957bdf9e2c28d5e5030de85fe9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 09:58:31 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:58:31 2026 +0200

    x86/domain: address Misra rule 11.1 violation in reset_stack_and_call_ind()
    
    Eclair dislikes both sides of the comparison to differ in noreturn
    attributes, thus deeming this a violation of "Conversions shall not be
    performed between a pointer to a function and any other type". Since gcc
    doesn't permit use of "noreturn" types used in a typecast, resort to
    typeof().
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/include/asm/current.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/current.h b/xen/arch/x86/include/asm/current.h
index 6139980ab1..fe9a86a3f7 100644
--- a/xen/arch/x86/include/asm/current.h
+++ b/xen/arch/x86/include/asm/current.h
@@ -208,7 +208,7 @@ unsigned long get_stack_dump_bottom (unsigned long sp);
 /* The constraint may only specify non-call-clobbered registers. */
 #define reset_stack_and_call_ind(fn)                                    \
     ({                                                                  \
-        (void)((fn) == (void (*)(void))NULL);                           \
+        (void)((fn) == (typeof(dom_xen->arch.ctxt_switch->tail))NULL);  \
         switch_stack_and_jump(fn, "INDIRECT_CALL %", "b");              \
     })
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:22:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:22:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427510.1650235 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyb-0003Mv-Vf; Mon, 21 Sep 2026 13:22:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427510.1650235; Mon, 21 Sep 2026 13:22:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyb-0003Mn-Sz; Mon, 21 Sep 2026 13:22:33 +0000
Received: by outflank-mailman (input) for mailman id 1427510;
 Mon, 21 Sep 2026 13:22:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dyb-0003Mh-51
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:22:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dya-008xSd-2Z
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyb-008iZ9-0H
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VXegkwZqkw45Nq1O9iBfP/u4wXN5A2kuPIyseofkeNc=; b=SUHC6fcLnH7pONTZIzNHDlr4Vc
	6DvJcm1d6esvzin7Ya/r+ZayK3HFELOenTQUx63AH6crNt9IVGTy/ojAO/ibDgbGT1pZGykMsrpay
	FxcoTaQeglpcbEByQ1Bs8ClbBfzdadJ4tzUb0o83HZGGkSm1Zy6EUhARiuWIFiOKOMCQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Eclair: relax long <-> function-pointer conversion deviation
Message-Id: <E1x8dyb-008iZ9-0H@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:22:33 +0000

commit 68c3f7fb3a840a0290ac1be76cb265bc8e7c6363
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 09:59:08 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 09:59:08 2026 +0200

    Eclair: relax long <-> function-pointer conversion deviation
    
    What is true for unsigned long is also true for plain/signed long, thus
    also taking care of two instances of __x86_return_thunk() being cast to
    long.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 8 ++++----
 docs/misra/rules.rst                             | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index c087032293..670d3693d6 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -368,17 +368,17 @@ constant expressions are required.\""
 # Series 11
 #
 
--doc_begin="The conversion from a function pointer to unsigned long or (void *) does not lose any information, provided that the target type has enough bits to store it."
+-doc_begin="The conversion from a function pointer to [unsigned] long or (void *) does not lose any information, provided that the target type has enough bits to store it."
 -config=MC3A2.R11.1,casts+={safe,
   "from(type(canonical(__function_pointer_types)))
-   &&to(type(canonical(builtin(unsigned long)||pointer(builtin(void)))))
+   &&to(type(canonical(builtin(long||unsigned long)||pointer(builtin(void)))))
    &&relation(definitely_preserves_value)"
 }
 -doc_end
 
--doc_begin="Conversion from unsigned long or (void *) to a function pointer can restore full information, provided that the source type has enough bits to restore it."
+-doc_begin="Conversion from [unsigned] long or (void *) to a function pointer can restore full information, provided that the source type has enough bits to restore it."
 -config=MC3A2.R11.1,casts+={safe,
-  "from(type(canonical(builtin(unsigned long)||pointer(builtin(void)))))
+  "from(type(canonical(builtin(long||unsigned long)||pointer(builtin(void)))))
    &&to(type(canonical(__function_pointer_types)))
    &&relation(definitely_preserves_value)"
 }
diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst
index b174add811..c9bbab6c08 100644
--- a/docs/misra/rules.rst
+++ b/docs/misra/rules.rst
@@ -432,8 +432,8 @@ maintainers if you want to suggest a change.
      - All conversions to integer types are permitted if the destination
        type has enough bits to hold the entire value. Conversions to bool
        and void* are permitted. Conversions from 'void noreturn (*)(...)'
-       to 'void (*)(...)' are permitted. Conversions from unsigned long or
-       '(void *)' to a function pointer are permitted.
+       to 'void (*)(...)' are permitted. Conversions from [unsigned] long
+       or '(void *)' to a function pointer are permitted.
        Example::
 
            unsigned long func_addr = (unsigned long)&some_function;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:22:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:22:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427511.1650239 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dym-0003PF-0y; Mon, 21 Sep 2026 13:22:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427511.1650239; Mon, 21 Sep 2026 13:22:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyl-0003P7-UO; Mon, 21 Sep 2026 13:22:43 +0000
Received: by outflank-mailman (input) for mailman id 1427511;
 Mon, 21 Sep 2026 13:22:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dyl-0003P1-8b
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:22:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyk-008xT4-2v
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyl-008kH0-0e
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=SVN6NG+Gkf4jd1AjXx+IQM96I/KnCXBoWVgdsgOaGsk=; b=KTO7jsn8JYOoe4BDS1R58g4UmH
	pnPss1LSoX5EeEKY4v7TlYL2Ke2cJ5krJaMv1T3LdbKr6TV5InB9YHeKFvDzKWxAMh047eL1SYnoC
	bevYSoY1obQcfX9PMmuVERHlbQjvMYmePLxeMnJAFnwoxyQM+SOFVD+5EOmS6MATc1YA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen: introduce CONFIG_HAS_SHARED_INFO for archs without a shared page
Message-Id: <E1x8dyl-008kH0-0e@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:22:43 +0000

commit 31fb44f8c02019f3a44e7ef6df0fbe0f2bce2ca3
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:19 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:05:20 2026 +0200

    xen: introduce CONFIG_HAS_SHARED_INFO for archs without a shared page
    
    On architectures that run guests in dom0less mode without the PV ABI
    (currently RISC-V), no shared_info page is allocated and d->shared_info
    remains NULL throughout the domain lifetime.  Several places in common
    code access d->shared_info through the shared_info() macro or directly,
    causing UBSAN null-pointer errors on such architectures.
    
    Rather than adding runtime NULL guards that are logically unreachable
    on x86 and Arm (where shared_info is always allocated), introduce a new
    Kconfig symbol CONFIG_HAS_SHARED_INFO selected by x86 and Arm.
    
    On !HAS_SHARED_INFO the shared_info() macro expands to a dereference
    of shared_info_absent, an extern pointer that is declared but
    intentionally never defined.  Any use of shared_info() that is not
    dead-code-eliminated will therefore cause a link-time failure, making
    missed guards impossible to overlook.
    
    The 2L event-channel ops call shared_info() and must not be compiled on
    architectures without a shared_info page, so event_2l.o is gated on
    CONFIG_HAS_SHARED_INFO.  On such architectures evtchn_init() installs the
    FIFO ops as a placeholder instead, so that a later guest opt-in to the
    FIFO ABI via EVTCHNOP_init_control has no special-casing to do; if FIFO
    support itself is also unavailable (!CONFIG_EVTCHN_FIFO), a dedicated
    no-op evtchn_port_ops_none table is installed instead, so that
    d->evtchn_port_ops is never NULL.  evtchn_fifo_word_from_port() is
    guarded against uninitialised d->evtchn_fifo so the FIFO ops are safe
    before evtchn_fifo_init_control() is called by the guest.
    
    With CONFIG_HAS_SHARED_INFO=n all vCPUs fall back to the global
    dummy_vcpu_info, so writes through vcpu_info() could leak data between
    vCPUs. Reviewing the write paths in common code: the write in
    map_guest_area() stores the constant ~0 so nothing serious would happen
    if it were leaked; the event_2l.c paths are not compiled on
    !HAS_SHARED_INFO, as event_2l.o is gated on CONFIG_HAS_SHARED_INFO; the
    write in vcpu_info_populate() targets the new mapping buffer, not
    dummy_vcpu_info.
    
    Outside common code, the remaining writes are x86 PV-specific, for which
    CONFIG_HAS_SHARED_INFO=y. No code changes are needed.
    
    Finally, struct domain's shared_info field itself is gated on
    CONFIG_HAS_SHARED_INFO, as it would otherwise be a permanently NULL
    pointer: every user of it is either arch code for an architecture that
    selects HAS_SHARED_INFO, or common code already guarded by the same
    Kconfig symbol.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Michal Orzel <michal.orzel@amd.com> #Arm
---
 xen/arch/arm/Kconfig       |  1 +
 xen/arch/x86/Kconfig       |  1 +
 xen/common/Kconfig         |  3 +++
 xen/common/Makefile        |  2 +-
 xen/common/domain.c        |  6 ++---
 xen/common/domctl.c        |  4 ++++
 xen/common/event_channel.c | 55 +++++++++++++++++++++++++++++++++++++++++++---
 xen/common/event_channel.h |  6 +++++
 xen/common/event_fifo.c    | 18 ++++++++++++++-
 xen/common/time.c          |  2 ++
 xen/include/xen/event.h    |  2 +-
 xen/include/xen/sched.h    |  2 ++
 xen/include/xen/shared.h   |  6 +++++
 xen/include/xen/time.h     |  5 +++++
 14 files changed, 104 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 843a43897e..d748404e82 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -20,6 +20,7 @@ config ARM
 	select HAS_DEVICE_TREE_DISCOVERY
 	select HAS_DOM0LESS
 	select HAS_GRANT_CACHE_FLUSH if GRANT_TABLE
+	select HAS_SHARED_INFO
 	select HAS_STACK_PROTECTOR
 	select HAS_STATIC_MEMORY
 	select HAS_UBSAN
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 3ce0774b8d..e5535ac484 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -29,6 +29,7 @@ config X86
 	select HAS_PCI_MSI
 	select HAS_PIRQ
 	select HAS_SCHED_GRANULARITY
+	select HAS_SHARED_INFO
 	imply HAS_SOFT_RESET
 	select HAS_UBSAN
 	select HAS_VMAP
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index da80fdba84..5b289e444f 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -158,6 +158,9 @@ config HAS_PMAP
 config HAS_SCHED_GRANULARITY
 	bool
 
+config HAS_SHARED_INFO
+	bool
+
 config HAS_STATIC_MEMORY
 	bool
 
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 6018e25614..f69d47d189 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_DEVICE_TREE_PARSE) += device-tree/
 obj-$(CONFIG_IOREQ_SERVER) += dm.o
 obj-y += domain.o
 obj-y += domid.o
-obj-y += event_2l.o
+obj-$(CONFIG_HAS_SHARED_INFO) += event_2l.o
 obj-y += event_channel.o
 obj-$(CONFIG_EVTCHN_FIFO) += event_fifo.o
 obj-$(CONFIG_GRANT_TABLE) += grant_table.o
diff --git a/xen/common/domain.c b/xen/common/domain.c
index e16f1ac383..6b52713518 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -316,9 +316,9 @@ void vcpu_info_reset(struct vcpu *v)
     struct domain *d = v->domain;
 
     v->vcpu_info_area.map =
-        ((v->vcpu_id < XEN_LEGACY_MAX_VCPUS)
-         ? (vcpu_info_t *)&shared_info(d, vcpu_info[v->vcpu_id])
-         : &dummy_vcpu_info);
+        IS_ENABLED(CONFIG_HAS_SHARED_INFO) && v->vcpu_id < XEN_LEGACY_MAX_VCPUS
+        ? (vcpu_info_t *)&shared_info(d, vcpu_info[v->vcpu_id])
+        : &dummy_vcpu_info;
 }
 
 static struct domain *alloc_domain_struct(void)
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index a6210db4fb..83405a766a 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -102,9 +102,13 @@ void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info)
 #ifdef CONFIG_MEM_PAGING
     info->paged_pages       = atomic_read(&d->paged_pages);
 #endif
+#ifdef CONFIG_HAS_SHARED_INFO
     info->shared_info_frame =
         gfn_x(mfn_to_gfn(d, _mfn(virt_to_mfn(d->shared_info))));
     BUG_ON(SHARED_M2P(info->shared_info_frame));
+#else
+    info->shared_info_frame = ~0;
+#endif
 
     info->cpupool = cpupool_get_id(d);
 
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index a7f9cc5fe0..bd03e094d0 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -40,6 +40,54 @@
 
 #define consumer_is_xen(e) (!!(e)->xen_consumer)
 
+#if !defined(CONFIG_HAS_SHARED_INFO) && !defined(CONFIG_EVTCHN_FIFO)
+/*
+ * Placeholder ops for domains with neither a shared_info page nor a FIFO
+ * control block. Such a domain has no ABI to record event state in, so these
+ * are reachable whenever an event is delivered to (or queried on) one of its
+ * ports; they just discard/no-op it. They exist to keep d->evtchn_port_ops
+ * non-NULL.
+ */
+static void cf_check evtchn_none_set_pending(
+    struct vcpu *v, struct evtchn *evtchn) {}
+static void cf_check evtchn_none_noop(
+    struct domain *d, struct evtchn *evtchn) {}
+static bool cf_check evtchn_none_false(
+    const struct domain *d, const struct evtchn *evtchn) { return false; }
+static void cf_check evtchn_none_print_state(
+    struct domain *d, const struct evtchn *evtchn) {}
+
+static const struct evtchn_port_ops evtchn_port_ops_none = {
+    .set_pending   = evtchn_none_set_pending,
+    .clear_pending = evtchn_none_noop,
+    .unmask        = evtchn_none_noop,
+    .is_pending    = evtchn_none_false,
+    .is_masked     = evtchn_none_false,
+    .print_state   = evtchn_none_print_state,
+};
+
+static void evtchn_none_init(struct domain *d)
+{
+    d->evtchn_port_ops = &evtchn_port_ops_none;
+}
+#else /* CONFIG_HAS_SHARED_INFO || CONFIG_EVTCHN_FIFO */
+/*
+ * Declaration only; the call in evtchn_preinit() is DCE'd unless both
+ * configs are off.
+ */
+void evtchn_none_init(struct domain *d);
+#endif /* !CONFIG_HAS_SHARED_INFO && !CONFIG_EVTCHN_FIFO */
+
+static void evtchn_preinit(struct domain *d)
+{
+    if ( IS_ENABLED(CONFIG_HAS_SHARED_INFO) )
+        evtchn_2l_init(d);
+    else if ( IS_ENABLED(CONFIG_EVTCHN_FIFO) )
+        evtchn_fifo_init_ops(d);
+    else
+        evtchn_none_init(d);
+}
+
 /*
  * Lock an event channel exclusively. This is allowed only when the channel is
  * free or unbound either when taking or when releasing the lock, as any
@@ -1324,9 +1372,9 @@ int evtchn_reset(struct domain *d, bool resuming)
         rc = -EAGAIN;
     else if ( d->evtchn_fifo )
     {
-        /* Switching back to 2-level ABI. */
+        /* Switching back to the default ABI. */
         evtchn_fifo_destroy(d);
-        evtchn_2l_init(d);
+        evtchn_preinit(d);
     }
 
     write_unlock(&d->event_lock);
@@ -1625,7 +1673,8 @@ void evtchn_check_pollers(struct domain *d, unsigned int port)
 
 int evtchn_init(struct domain *d, unsigned int max_port)
 {
-    evtchn_2l_init(d);
+    evtchn_preinit(d);
+
     d->max_evtchn_port = min_t(unsigned int, max_port, INT_MAX);
 
     d->evtchn = alloc_evtchn_bucket(d, 0);
diff --git a/xen/common/event_channel.h b/xen/common/event_channel.h
index dc94a43cc2..423c4ee77b 100644
--- a/xen/common/event_channel.h
+++ b/xen/common/event_channel.h
@@ -70,6 +70,12 @@ static inline void evtchn_fifo_destroy(struct domain *d)
 }
 #endif /* CONFIG_EVTCHN_FIFO */
 
+/*
+ * Declaration only when !CONFIG_EVTCHN_FIFO; the call in evtchn_preinit() is
+ * DCE'd in that case.
+ */
+void evtchn_fifo_init_ops(struct domain *d);
+
 #endif /* EVENT_CHANNEL_H */
 
 /*
diff --git a/xen/common/event_fifo.c b/xen/common/event_fifo.c
index 611bf8a788..e4225b1b66 100644
--- a/xen/common/event_fifo.c
+++ b/xen/common/event_fifo.c
@@ -62,6 +62,9 @@ static inline event_word_t *evtchn_fifo_word_from_port(const struct domain *d,
      */
     smp_rmb();
 
+    if ( unlikely(!d->evtchn_fifo) )
+        return NULL;
+
     if ( unlikely(port >= d->evtchn_fifo->num_evtchns) )
         return NULL;
 
@@ -419,6 +422,18 @@ static const struct evtchn_port_ops evtchn_port_ops_fifo =
     .print_state   = evtchn_fifo_print_state,
 };
 
+/*
+ * evtchn_fifo_init_ops()'s only call site is the
+ * IS_ENABLED(CONFIG_EVTCHN_FIFO) branch of evtchn_preinit(), which is never
+ * reached on HAS_SHARED_INFO=y builds because of DCE.
+ */
+#ifndef CONFIG_HAS_SHARED_INFO
+void evtchn_fifo_init_ops(struct domain *d)
+{
+    d->evtchn_port_ops = &evtchn_port_ops_fifo;
+}
+#endif
+
 static int map_guest_page(struct domain *d, uint64_t gfn, void **virt)
 {
     struct page_info *p;
@@ -561,7 +576,8 @@ static void setup_ports(struct domain *d, unsigned int prev_evtchns)
 
         evtchn = evtchn_from_port(d, port);
 
-        if ( guest_test_bit(d, port, &shared_info(d, evtchn_pending)) )
+        if ( IS_ENABLED(CONFIG_HAS_SHARED_INFO) &&
+             guest_test_bit(d, port, &shared_info(d, evtchn_pending)) )
             evtchn->pending = true;
 
         evtchn_fifo_set_priority(d, evtchn, EVTCHN_FIFO_PRIORITY_DEFAULT);
diff --git a/xen/common/time.c b/xen/common/time.c
index 0ddf65448d..58d2b54a29 100644
--- a/xen/common/time.c
+++ b/xen/common/time.c
@@ -98,6 +98,7 @@ struct tm gmtime(unsigned long t)
     return tbuf;
 }
 
+#ifdef CONFIG_HAS_SHARED_INFO
 void update_domain_wallclock_time(struct domain *d)
 {
     uint32_t *wc_version;
@@ -126,6 +127,7 @@ void update_domain_wallclock_time(struct domain *d)
 
     spin_unlock(&wc_lock);
 }
+#endif /* CONFIG_HAS_SHARED_INFO */
 
 /* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */
 void do_settime(u64 secs, unsigned int nsecs, u64 system_time_base)
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 930190054c..595dedf079 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -211,7 +211,7 @@ static bool evtchn_usable(const struct evtchn *evtchn)
 
 void evtchn_check_pollers(struct domain *d, unsigned int port);
 
-/* Close all event channels and reset to 2-level ABI. */
+/* Close all event channels and reset to the default ABI. */
 int evtchn_reset(struct domain *d, bool resuming);
 
 /*
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index e352e2b38e..73c54794ac 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -404,7 +404,9 @@ struct domain
 
     struct vcpu    **vcpu;
 
+#ifdef CONFIG_HAS_SHARED_INFO
     shared_info_t   *shared_info;     /* shared data area */
+#endif
 
     rcu_read_lock_t  rcu_lock;
 
diff --git a/xen/include/xen/shared.h b/xen/include/xen/shared.h
index 5b71342cab..1589e8793f 100644
--- a/xen/include/xen/shared.h
+++ b/xen/include/xen/shared.h
@@ -43,7 +43,13 @@ typedef struct vcpu_info vcpu_info_t;
 
 extern vcpu_info_t dummy_vcpu_info;
 
+#ifdef CONFIG_HAS_SHARED_INFO
 #define shared_info(d, field)      __shared_info(d, (d)->shared_info, field)
+#else
+extern struct shared_info *shared_info_absent;
+#define shared_info(d, field) (((void)(d), shared_info_absent)->field)
+#endif /* CONFIG_HAS_SHARED_INFO */
+
 #define vcpu_info(v, field)        \
         __vcpu_info(v, (vcpu_info_t *)(v)->vcpu_info_area.map, field)
 
diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h
index 4db24617a9..09da150c2a 100644
--- a/xen/include/xen/time.h
+++ b/xen/include/xen/time.h
@@ -72,7 +72,12 @@ extern bool NOW_good;
 #define version_update_begin(v) (((v) + 1) | 1)
 #define version_update_end(v)   ((v) + 1)
 extern void update_vcpu_system_time(struct vcpu *v);
+
+#ifdef CONFIG_HAS_SHARED_INFO
 extern void update_domain_wallclock_time(struct domain *d);
+#else
+static inline void update_domain_wallclock_time(struct domain *d) {}
+#endif
 
 extern void do_settime(
     u64 secs, unsigned int nsecs, u64 system_time_base);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:22:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:22:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427512.1650242 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyw-0003Ra-3W; Mon, 21 Sep 2026 13:22:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427512.1650242; Mon, 21 Sep 2026 13:22:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dyw-0003RT-10; Mon, 21 Sep 2026 13:22:54 +0000
Received: by outflank-mailman (input) for mailman id 1427512;
 Mon, 21 Sep 2026 13:22:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dyv-0003RL-B8
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:22:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyu-008xVf-3C
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dyv-008lhx-0v
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:22:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=BjYYOVsy2pg/XWrHNv26/smUIK1Q14mpsr8j3DL8g7E=; b=tzt49d5ZWQOAXnfsf4qqEGnMPD
	KmvkXJP0nQW1duUxFFdhv+NV8gubV2+7wUidPASGvU2Lss0CFVFU6f7BX5jkybkYCi6/zaDwEfiiv
	O+GgfQCdWF3uujNO36mpagzM728G8bwcWNk3U+c55QuXpxSdq09iBmM/KNWLvMmr04Us=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: Implement construct_domain()
Message-Id: <E1x8dyv-008lhx-0v@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:22:53 +0000

commit a83e5b41c4bae62fa21b4b6ffe69a2e5a7c40b5f
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:21 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:06:12 2026 +0200

    xen/riscv: Implement construct_domain()
    
    Implement construct_domain() function for RISC-V, which performs initial setup
    for the domain's first vCPU, loads the kernel, initrd, and device tree,
    and sets up guest CPU registers for boot.
    
    It also creates additional vCPUs up to max_vcpus and assigns the device tree
    address and boot cpuid in registers.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/Makefile       |  1 +
 xen/arch/riscv/domain-build.c | 50 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 4fcdcf9e24..2d24670dfc 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,6 +1,7 @@
 obj-y += aplic.o
 obj-y += cpufeature.o
 obj-y += domain.o
+obj-y += domain-build.init.o
 obj-$(CONFIG_DOM0LESS_BOOT) += dom0less-build.init.o
 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
 obj-y += entry.o
diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
new file mode 100644
index 0000000000..5f6f4b6248
--- /dev/null
+++ b/xen/arch/riscv/domain-build.c
@@ -0,0 +1,50 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <xen/fdt-domain-build.h>
+#include <xen/fdt-kernel.h>
+#include <xen/init.h>
+#include <xen/sched.h>
+
+#include <asm/current.h>
+#include <asm/guest_access.h>
+
+int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
+{
+    struct vcpu *v = d->vcpu[0];
+    struct cpu_user_regs *regs = vcpu_guest_cpu_user_regs(v);
+
+    BUG_ON(v->is_initialised);
+
+    /*
+     * At the moment *_load() don't return value and will just panic()
+     * inside.
+     * TODO: it will be good to change that.
+     */
+    kernel_load(kinfo);
+    initrd_load(kinfo, copy_to_guest_phys);
+    dtb_load(kinfo, copy_to_guest_phys);
+
+    regs->sepc = kinfo->entry;
+
+    /* Guest boot cpuid = 0 */
+    regs->a0 = 0;
+    regs->a1 = kinfo->dtb_paddr;
+
+    for ( unsigned int i = 1; i < d->max_vcpus; i++ )
+    {
+        const struct vcpu *tmp_v = vcpu_create(d, i);
+
+        if ( !tmp_v )
+        {
+            printk("Failed to allocate %pdv%u\n", d, i);
+            break;
+        }
+    }
+
+    domain_update_node_affinity(d);
+
+    v->is_initialised = true;
+    clear_bit(_VPF_down, &v->pause_flags);
+
+    return 0;
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:23:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:23:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427513.1650246 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dz6-0003Un-5C; Mon, 21 Sep 2026 13:23:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427513.1650246; Mon, 21 Sep 2026 13:23:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dz6-0003Uf-2c; Mon, 21 Sep 2026 13:23:04 +0000
Received: by outflank-mailman (input) for mailman id 1427513;
 Mon, 21 Sep 2026 13:23:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dz5-0003UY-Eq
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:23:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dz5-008xW5-0G
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dz5-008nIX-1D
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=8JWHqSP+FaPhSOalKTIBP8xz9VX+yE7ICa0oa1RLMKA=; b=UkOpU2J7UNsFu8pCoUgWPWCwuB
	ADpiSyrRbAWq20oEPndqOuNVysK6UYMb71ddhUBe58/I0bc+R/1APW5aU47n7rLDt1lPaMJmnAmGR
	7TfJGyO9eEYcrm2aPFW7kK+CLPZWiP/SUs2ADD8WvCwokLXQGqnpvKhccijogvtW5AXM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce guest riscv,isa string
Message-Id: <E1x8dz5-008nIX-1D@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:23:03 +0000

commit 282bbc3cabf9cc26592044cc70acf2bd746f63d2
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:06:37 2026 +0200

    xen/riscv: introduce guest riscv,isa string
    
    Introduce build_guest_isa_str() to generate the riscv,isa string to be
    passed to the guest via the Device Tree riscv,isa property.
    
    Introduce the per-domain guest ISA bitmap, populated during domain
    creation by calling init_guest_isa().
    
    Introduce struct riscv_isa_ext_entry with a new guest_flags field
    to filter out ISA extensions that should not be exposed to guests:
    
    - f/d/q/v: FPU and vector context save/restore are not yet implemented
      for guests.
    - Z*inx are not exposed either: they aren't in riscv_isa_ext[], so they
      can never be set in riscv_isa and thus never reach a guest, and no
      current hardware/guest-OS advertises or expects them. Supporting them
      would be cheaper than F/D/Q (FP values stay in integer registers Xen
      already context-switches), but is left as future work.
    - h: Nested virtualisation is not supported.
    - sstc: Xen owns the supervisor timer; guests must use SBI.
    - svade: Xen manages hardware A/D bit updates in stage-2 page tables.
    - svpbmt: Page-based memory types are not yet wired up in stage-2 code.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/cpufeature.c             | 200 ++++++++++++++++++++++++++++----
 xen/arch/riscv/domain.c                 |   2 +
 xen/arch/riscv/include/asm/cpufeature.h |   5 +
 xen/arch/riscv/include/asm/domain.h     |   3 +
 4 files changed, 186 insertions(+), 24 deletions(-)

diff --git a/xen/arch/riscv/cpufeature.c b/xen/arch/riscv/cpufeature.c
index 92235fdfd5..aaf544d13f 100644
--- a/xen/arch/riscv/cpufeature.c
+++ b/xen/arch/riscv/cpufeature.c
@@ -14,7 +14,9 @@
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/sched.h>
 #include <xen/sections.h>
+#include <xen/xvmalloc.h>
 
 #include <asm/cpufeature.h>
 #include <asm/csr.h>
@@ -34,9 +36,64 @@ struct riscv_isa_ext_data {
     .name = #ext_name,                          \
 }
 
+/*
+ * Which guests an extension may be handed out to, by guest XLEN.
+ *
+ * These flags express Xen's policy, not the ISA's rules: extensions which
+ * are architecturally tied to one XLEN (Zilsd on RV32, say) need no special
+ * treatment here, as they can only ever appear in the "riscv,isa" of a host
+ * of that XLEN, and guest_isa is masked against the host ISA bitmap anyway.
+ * They are only of use for extensions Xen chooses not to expose to guests of
+ * a given width despite the hardware implementing them.
+ */
+#define RISCV_ISA_EXT_GUEST_NONE 0
+#define RISCV_ISA_EXT_GUEST_RV32 (1U << 0)
+#define RISCV_ISA_EXT_GUEST_RV64 (1U << 1)
+#define RISCV_ISA_EXT_GUEST_ANY  (RISCV_ISA_EXT_GUEST_RV32 | \
+                                  RISCV_ISA_EXT_GUEST_RV64)
+
+/*
+ * Guests are of the same width as Xen itself for the time being; once guest
+ * XLEN can differ from host XLEN (hstatus.VSXL), this becomes a per-domain
+ * property, just as guest_isa below does.
+ */
+#if defined(CONFIG_RISCV_32)
+#define RISCV_ISA_EXT_GUEST_XLEN RISCV_ISA_EXT_GUEST_RV32
+#elif defined(CONFIG_RISCV_64)
+#define RISCV_ISA_EXT_GUEST_XLEN RISCV_ISA_EXT_GUEST_RV64
+#else
+# error "Unsupported RISC-V bitness"
+#endif
+
+struct riscv_isa_ext_entry {
+    unsigned int id;
+    const char *name;
+    unsigned int guest_flags;
+};
+
+#define RISCV_ISA_EXT_ENTRY(ext_name, guest)        \
+{                                                   \
+    .id          = RISCV_ISA_EXT_ ## ext_name,      \
+    .name        = #ext_name,                       \
+    .guest_flags = RISCV_ISA_EXT_GUEST_ ## guest,   \
+}
+
 /* Host ISA bitmap */
 static __ro_after_init DECLARE_BITMAP(riscv_isa, RISCV_ISA_EXT_MAX);
 
+/*
+ * ISA bitmap handed out to every guest.
+ *
+ * All guests are given the same extensions for the time being, so this is
+ * computed once out of riscv_isa_ext[] and riscv_isa, rather than redoing
+ * the walk for every domain created.  Should per-domain ISA policy ever be
+ * introduced, this will need to become per-domain again.
+ */
+static __ro_after_init DECLARE_BITMAP(guest_isa, RISCV_ISA_EXT_MAX);
+
+/* "riscv,isa" string corresponding to guest_isa, shared by all domains. */
+static char *__ro_after_init guest_isa_str;
+
 static int __init dt_get_cpuid_from_node(const struct dt_device_node *cpu,
                                          unsigned long *dt_cpuid)
 {
@@ -120,29 +177,30 @@ static int __init dt_get_cpuid_from_node(const struct dt_device_node *cpu,
  * and strncmp() is used in match_isa_ext() to compare extension names instead
  * of strncasecmp().
  */
-const struct riscv_isa_ext_data __initconst riscv_isa_ext[] = {
-    RISCV_ISA_EXT_DATA(i),
-    RISCV_ISA_EXT_DATA(m),
-    RISCV_ISA_EXT_DATA(a),
-    RISCV_ISA_EXT_DATA(f),
-    RISCV_ISA_EXT_DATA(d),
-    RISCV_ISA_EXT_DATA(q),
-    RISCV_ISA_EXT_DATA(c),
-    RISCV_ISA_EXT_DATA(h),
-    RISCV_ISA_EXT_DATA(zicntr),
-    RISCV_ISA_EXT_DATA(zicsr),
-    RISCV_ISA_EXT_DATA(zifencei),
-    RISCV_ISA_EXT_DATA(zihintpause),
-    RISCV_ISA_EXT_DATA(zihpm),
-    RISCV_ISA_EXT_DATA(zba),
-    RISCV_ISA_EXT_DATA(zbb),
-    RISCV_ISA_EXT_DATA(zbs),
-    RISCV_ISA_EXT_DATA(smaia),
-    RISCV_ISA_EXT_DATA(smstateen),
-    RISCV_ISA_EXT_DATA(ssaia),
-    RISCV_ISA_EXT_DATA(sstc),
-    RISCV_ISA_EXT_DATA(svade),
-    RISCV_ISA_EXT_DATA(svpbmt),
+static const struct riscv_isa_ext_entry __initconstrel riscv_isa_ext[] = {
+    RISCV_ISA_EXT_ENTRY(i,              ANY),
+    RISCV_ISA_EXT_ENTRY(m,              ANY),
+    RISCV_ISA_EXT_ENTRY(a,              ANY),
+    RISCV_ISA_EXT_ENTRY(f,              NONE),
+    RISCV_ISA_EXT_ENTRY(d,              NONE),
+    RISCV_ISA_EXT_ENTRY(q,              NONE),
+    RISCV_ISA_EXT_ENTRY(c,              ANY),
+    RISCV_ISA_EXT_ENTRY(v,              NONE),
+    RISCV_ISA_EXT_ENTRY(h,              NONE),
+    RISCV_ISA_EXT_ENTRY(zicntr,         ANY),
+    RISCV_ISA_EXT_ENTRY(zicsr,          ANY),
+    RISCV_ISA_EXT_ENTRY(zifencei,       ANY),
+    RISCV_ISA_EXT_ENTRY(zihintpause,    ANY),
+    RISCV_ISA_EXT_ENTRY(zihpm,          ANY),
+    RISCV_ISA_EXT_ENTRY(zba,            ANY),
+    RISCV_ISA_EXT_ENTRY(zbb,            ANY),
+    RISCV_ISA_EXT_ENTRY(zbs,            ANY),
+    RISCV_ISA_EXT_ENTRY(smaia,          ANY),
+    RISCV_ISA_EXT_ENTRY(smstateen,      ANY),
+    RISCV_ISA_EXT_ENTRY(ssaia,          ANY),
+    RISCV_ISA_EXT_ENTRY(sstc,           NONE),
+    RISCV_ISA_EXT_ENTRY(svade,          NONE),
+    RISCV_ISA_EXT_ENTRY(svpbmt,         NONE),
 };
 
 static const struct riscv_isa_ext_data __initconst required_extensions[] = {
@@ -181,7 +239,7 @@ static void __init match_isa_ext(const char *name, const char *name_end,
 
     for ( unsigned int i = 0; i < riscv_isa_ext_count; i++ )
     {
-        const struct riscv_isa_ext_data *ext = &riscv_isa_ext[i];
+        const struct riscv_isa_ext_entry *ext = &riscv_isa_ext[i];
 
         /*
          * `ext->name` (according to initialization of riscv_isa_ext[]
@@ -480,6 +538,98 @@ bool riscv_isa_extension_available(const unsigned long *isa_bitmap,
     return test_bit(id, isa_bitmap);
 }
 
+static int __init build_guest_isa_str(char *buf, size_t size)
+{
+    char *p = buf;
+    size_t left = size;
+    int total;
+
+#if defined(CONFIG_RISCV_32)
+    total = snprintf(p, left, "rv32");
+#elif defined(CONFIG_RISCV_64)
+    total = snprintf(p, left, "rv64");
+#else
+#   error "Unsupported RISC-V bitness"
+#endif
+
+    if ( total < 0 )
+        return total;
+
+    if ( buf )
+    {
+        if ( (size_t)total >= left )
+            return -ENOSPC;
+
+        p += total;
+        left -= total;
+    }
+
+    for ( unsigned int i = 0; i < ARRAY_SIZE(riscv_isa_ext); i++ )
+    {
+        const struct riscv_isa_ext_entry *ext = &riscv_isa_ext[i];
+        int ret;
+
+        if ( !riscv_isa_extension_available(guest_isa, ext->id) )
+            continue;
+
+        ret = snprintf(p, left, "%s%s",
+                       ext->id >= RISCV_ISA_EXT_BASE ? "_" : "",
+                       ext->name);
+        if ( ret < 0 )
+            return ret;
+
+        total += ret;
+
+        if ( buf )
+        {
+            if ( (size_t)ret >= left )
+                return -ENOSPC;
+
+            p += ret;
+            left -= ret;
+        }
+    }
+
+    return total;
+}
+
+static void __init compute_guest_isa(void)
+{
+    int len;
+
+    for ( unsigned int i = 0; i < ARRAY_SIZE(riscv_isa_ext); i++ )
+    {
+        const struct riscv_isa_ext_entry *ext = &riscv_isa_ext[i];
+
+        if ( (ext->guest_flags & RISCV_ISA_EXT_GUEST_XLEN) &&
+             riscv_isa_extension_available(NULL, ext->id) )
+            __set_bit(ext->id, guest_isa);
+    }
+
+    /*
+     * All domains are given the same guest ISA, so the "riscv,isa" string
+     * is built only once here and then shared by all of them.
+     */
+    if ( (len = build_guest_isa_str(NULL, 0)) < 0 )
+        panic("Failed to calculate guest \"riscv,isa\" length: %d\n", len);
+
+    if ( !(guest_isa_str = xvmalloc_array(char, len + 1)) )
+        panic("Failed to allocate guest \"riscv,isa\" string\n");
+
+    if ( build_guest_isa_str(guest_isa_str, len + 1) != len )
+        panic("Failed to build guest \"riscv,isa\" string\n");
+}
+
+void init_guest_isa(struct domain *d)
+{
+    d->arch.isa = guest_isa;
+}
+
+const char *get_guest_isa_str(void)
+{
+    return guest_isa_str;
+}
+
 void __init riscv_fill_hwcap(void)
 {
     unsigned int i;
@@ -527,4 +677,6 @@ void __init riscv_fill_hwcap(void)
     if ( !all_extns_available )
         panic("Look why the extensions above are needed in "
               "https://xenbits.xenproject.org/docs/unstable/misc/riscv/booting.txt\n");
+
+    compute_guest_isa();
 }
diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c
index 2819ff4e7c..c993314759 100644
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -308,6 +308,8 @@ int arch_domain_create(struct domain *d,
     if ( is_idle_domain(d) )
         return 0;
 
+    init_guest_isa(d);
+
     if ( (rc = p2m_init(d, config)) != 0)
         goto fail;
 
diff --git a/xen/arch/riscv/include/asm/cpufeature.h b/xen/arch/riscv/include/asm/cpufeature.h
index 0c48d57a03..2973eb13a5 100644
--- a/xen/arch/riscv/include/asm/cpufeature.h
+++ b/xen/arch/riscv/include/asm/cpufeature.h
@@ -5,6 +5,7 @@
 #ifndef __ASSEMBLER__
 
 #include <xen/stdbool.h>
+#include <xen/types.h>
 
 /*
  * These macros represent the logical IDs of each multi-letter RISC-V ISA
@@ -44,7 +45,11 @@ enum riscv_isa_ext_id {
     RISCV_ISA_EXT_MAX
 };
 
+struct domain;
+
 void riscv_fill_hwcap(void);
+void init_guest_isa(struct domain *d);
+const char *get_guest_isa_str(void);
 
 bool riscv_isa_extension_available(const unsigned long *isa_bitmap,
                                    enum riscv_isa_ext_id id);
diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/asm/domain.h
index 6044ce0fee..8ae01a5e4d 100644
--- a/xen/arch/riscv/include/asm/domain.h
+++ b/xen/arch/riscv/include/asm/domain.h
@@ -7,6 +7,7 @@
 #include <xen/xmalloc.h>
 #include <public/hvm/params.h>
 
+#include <asm/cpufeature.h>
 #include <asm/guest-layout.h>
 #include <asm/p2m.h>
 #include <asm/vtimer.h>
@@ -94,6 +95,8 @@ struct arch_domain {
     struct p2m_domain p2m;
 
     struct paging_domain paging;
+
+    const unsigned long *isa;
 };
 
 #include <xen/sched.h>
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:23:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:23:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427514.1650251 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzG-0003Wn-6g; Mon, 21 Sep 2026 13:23:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427514.1650251; Mon, 21 Sep 2026 13:23:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzG-0003Wf-3x; Mon, 21 Sep 2026 13:23:14 +0000
Received: by outflank-mailman (input) for mailman id 1427514;
 Mon, 21 Sep 2026 13:23:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dzF-0003WX-Gx
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:23:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzF-008xWG-0Y
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzF-008oPA-1V
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=182+MrKZhHExwvpDglMQTH7xs5bJ9aYzWTR542xFm+o=; b=WrPky2+k953RDtmtKwZ3nYvOtq
	kt16R790YnubH1jktEH6jBsa6BSG/GUmVRRxPj+NQ/jFXta1FyW0vWPG88MQd4gnfkq/tTj9fH4gF
	p7LBCNoR0G7Je+wsVgf5hemPPtIKvxtBM1o6690JrCGrisvRsLEHH3XA7DMnuza/vlKw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: implement make_cpus_node()
Message-Id: <E1x8dzF-008oPA-1V@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:23:13 +0000

commit 213ca210ffb58fb1ba6208177627db6bfbb3f4a2
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:23 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:06:57 2026 +0200

    xen/riscv: implement make_cpus_node()
    
    Implement make_cpus_node() to create cpus node for a guest domain.
    
    This function is going to be use by common dom0less code during
    construction domain.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/domain-build.c | 106 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
index 5f6f4b6248..1af4c48fb3 100644
--- a/xen/arch/riscv/domain-build.c
+++ b/xen/arch/riscv/domain-build.c
@@ -3,8 +3,10 @@
 #include <xen/fdt-domain-build.h>
 #include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 
+#include <asm/cpufeature.h>
 #include <asm/current.h>
 #include <asm/guest_access.h>
 
@@ -48,3 +50,107 @@ int __init construct_domain(struct domain *d, struct kernel_info *kinfo)
 
     return 0;
 }
+
+int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
+{
+    int res;
+    const struct dt_device_node *cpus = dt_find_node_by_path("/cpus");
+    uint32_t timebase_frequency;
+    bool frequency_valid;
+    void *fdt = kinfo->fdt;
+
+    dt_dprintk("Create cpus node\n");
+
+    if ( !cpus )
+    {
+        dprintk(XENLOG_ERR, "Missing /cpus node in the device tree?\n");
+        return -ENOENT;
+    }
+
+    frequency_valid = dt_property_read_u32(cpus, "timebase-frequency",
+                                           &timebase_frequency);
+
+    res = fdt_begin_node(fdt, "cpus");
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "#address-cells", 1);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "#size-cells", 0);
+    if ( res )
+        return res;
+
+    if ( frequency_valid )
+        res = fdt_property_cell(fdt, "timebase-frequency", timebase_frequency);
+
+    for ( unsigned int cpu = 0; cpu < d->max_vcpus; cpu++ )
+    {
+        char buf[64];
+
+        snprintf(buf, ARRAY_SIZE(buf), "cpu@%u", cpu);
+        res = fdt_begin_node(fdt, buf);
+        if ( res )
+            return res;
+
+        res = fdt_property_cell(fdt, "reg", cpu);
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "status", "okay");
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "compatible", "riscv");
+        if ( res )
+            return res;
+
+        BUILD_BUG_ON((sizeof("riscv,") +
+                      sizeof_field(struct gstage_mode_desc, name)) >= sizeof(buf));
+        snprintf(buf, ARRAY_SIZE(buf), "riscv,%s", max_gstage_mode->name);
+        res = fdt_property_string(fdt, "mmu-type", buf);
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "riscv,isa", get_guest_isa_str());
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "device_type", "cpu");
+        if ( res )
+            return res;
+
+        /* Start of interrupt-controller */
+        res = fdt_begin_node(fdt, "interrupt-controller");
+        if ( res )
+            return res;
+
+        res = fdt_property_string(fdt, "compatible", "riscv,cpu-intc");
+        if ( res )
+            return res;
+
+        res = fdt_property_cell(fdt, "#interrupt-cells", 1);
+        if ( res )
+            return res;
+
+        res = fdt_property(fdt, "interrupt-controller", NULL, 0);
+        if ( res )
+            return res;
+
+        res = fdt_property_u32(fdt, "phandle", alloc_phandle(kinfo));
+        if ( res )
+            return res;
+
+        /* End of interrupt-controller */
+        res = fdt_end_node(fdt);
+        if ( res )
+            return res;
+
+        res = fdt_end_node(fdt);
+        if ( res )
+            return res;
+    }
+
+    return fdt_end_node(fdt);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:23:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:23:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427515.1650254 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzQ-0003Yd-7v; Mon, 21 Sep 2026 13:23:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427515.1650254; Mon, 21 Sep 2026 13:23:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzQ-0003YV-5D; Mon, 21 Sep 2026 13:23:24 +0000
Received: by outflank-mailman (input) for mailman id 1427515;
 Mon, 21 Sep 2026 13:23:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dzP-0003YP-Jo
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:23:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzP-008xWS-0q
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzP-008pWt-1n
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=gwxxXgzHmH2f6+grdlxPR1ICJ14PkFR1avv204KYBxE=; b=F8XIviaWOh8UzkZr+OXBcDeRQn
	WVZfDJ4l01Zt7Jur1zVB+l3r3xmh1+JCETeoAzZLiNoDwproJDem9w3Gpu5iIJ+sQHZyoPNS6RsaO
	+O3YKVYghSJJzXEH2Xd4AnnOwARkrZKk/T8yv5fg2uzN6eln4Ss6rVbJ/dwF7Rnm57Dc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: implement make_timer_node()
Message-Id: <E1x8dzP-008pWt-1n@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:23:23 +0000

commit 913cf380cfc9b60086c0aca2c325311085c56a87
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:24 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:11 2026 +0200

    xen/riscv: implement make_timer_node()
    
    Generally, in DT for RISC-V there is a document which describes a timer
    node (riscv,timer.yaml or sifive,clint.yaml), but the Linux timer driver
    is declared with TIMER_OF_DECLARE(riscv_timer, "riscv", ...).
    It matches the CPU node (compatible "riscv"), not the timer node itself.
    It then calls of_find_compatible_node(NULL, NULL, "riscv,timer") only to
    read the optional riscv,timer-cannot-wake-cpu property.
    
    Since Xen does not care about that property for now, make_timer_node() is
    implemented to return 0, as no timer node needs to be created for RISC-V
    guests.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/domain-build.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
index 1af4c48fb3..d7613721db 100644
--- a/xen/arch/riscv/domain-build.c
+++ b/xen/arch/riscv/domain-build.c
@@ -3,6 +3,7 @@
 #include <xen/fdt-domain-build.h>
 #include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/fdt-kernel.h>
 #include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 
@@ -154,3 +155,10 @@ int __init make_cpus_node(const struct domain *d, struct kernel_info *kinfo)
 
     return fdt_end_node(fdt);
 }
+
+int __init make_timer_node(const struct kernel_info *kinfo)
+{
+    /* There is no need for timer node for RISC-V. */
+
+    return 0;
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:23:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:23:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427516.1650258 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dza-0003ap-8y; Mon, 21 Sep 2026 13:23:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427516.1650258; Mon, 21 Sep 2026 13:23:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dza-0003ai-6Z; Mon, 21 Sep 2026 13:23:34 +0000
Received: by outflank-mailman (input) for mailman id 1427516;
 Mon, 21 Sep 2026 13:23:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dzZ-0003ac-MJ
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:23:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzZ-008xWa-16
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzZ-008qsp-24
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=btvFj2+jO8ZS8PRfnE1dfOnwNFjgWJCRzelA8HDPvD8=; b=E7NvNoq1rtP8t14egFDTRhWeJB
	cldz9EDnJtP4jV8d/UcG7/8togVs1vV7ANKUVi/XchdZo+cvi37JaRdnDlTuuIlT9A1qdzCDUSRJe
	/QfraUpjeBWSJnv4Xnxc7dSGcbsrNbJjauI5Ut58obAN+DeA450udbJ8GDiUUy3JswmU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: implement make_arch_nodes()
Message-Id: <E1x8dzZ-008qsp-24@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:23:33 +0000

commit 7e4be8d8ebde58b626303cd95fc3bef70fb4d473
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:25 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:24 2026 +0200

    xen/riscv: implement make_arch_nodes()
    
    No RISC-V-specific nodes need to be created at the moment,
    so make_arch_nodes() is implemented to simply return 0.
    
    It is placed in dom0less-build.c as make_arch_nodes() is
    only used in the dom0less code path. In the future, it will
    be extended to create an emulated UART node.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/dom0less-build.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/riscv/dom0less-build.c b/xen/arch/riscv/dom0less-build.c
index a683972e92..4cc00012aa 100644
--- a/xen/arch/riscv/dom0less-build.c
+++ b/xen/arch/riscv/dom0less-build.c
@@ -2,10 +2,18 @@
 
 #include <xen/bootfdt.h>
 #include <xen/device_tree.h>
+#include <xen/fdt-kernel.h>
 #include <xen/init.h>
 
 #include <asm/p2m.h>
 
+int __init make_arch_nodes(struct kernel_info *kinfo)
+{
+    /* No RISC-V specific nodes need to be made, at the moment. */
+
+    return 0;
+}
+
 int __init arch_parse_dom0less_node(struct dt_device_node *node,
                                     struct boot_domain *bd)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:23:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:23:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427517.1650263 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzk-0003da-Bq; Mon, 21 Sep 2026 13:23:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427517.1650263; Mon, 21 Sep 2026 13:23:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzk-0003dS-9B; Mon, 21 Sep 2026 13:23:44 +0000
Received: by outflank-mailman (input) for mailman id 1427517;
 Mon, 21 Sep 2026 13:23:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dzj-0003dM-Om
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:23:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzj-008xX3-1L
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzj-008sd2-2K
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5RQBBO/EPvjtSLXjVHN3hZlTKCPxen1m6RdYcTwACHQ=; b=voXDVGxbEo1QtzU7IFXBXODsvv
	j+8zH6m9zYHcJeUhXuzF/O/77Q36a4vVB5dr6KdmNv89ETpVWeFc+cg8KuOOteCLlKpSAswNOZDfQ
	VaXnSO8YuMBDXKbUpgChsqpwY/DkUfo102ybLPXb+5y6Z+AifoPf7yfwccCgAR0IoafI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce init interrupt controller operations
Message-Id: <E1x8dzj-008sd2-2K@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:23:43 +0000

commit c91771c85cec5f79a88cbc7912a27e9cb3507fdb
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:26 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:42 2026 +0200

    xen/riscv: introduce init interrupt controller operations
    
    Introduce intc_hw_init_ops structure to avoid risky mix of init
    function and non-init function.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/aplic.c            |  8 ++++++--
 xen/arch/riscv/include/asm/intc.h | 10 +++++++---
 xen/arch/riscv/intc.c             | 11 ++++++++---
 3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c
index 9f023db5d5..d08401db46 100644
--- a/xen/arch/riscv/aplic.c
+++ b/xen/arch/riscv/aplic.c
@@ -325,12 +325,16 @@ static const hw_irq_controller aplic_xen_irq_type = {
 
 static const struct intc_hw_operations aplic_ops = {
     .info                = &aplic_info,
-    .init                = aplic_init,
     .host_irq_type       = &aplic_xen_irq_type,
     .handle_interrupt    = aplic_handle_interrupt,
     .set_irq_type        = aplic_set_irq_type,
 };
 
+static const struct intc_hw_init_ops __initconstrel aplic_init_ops = {
+    .ops                 = &aplic_ops,
+    .init                = aplic_init,
+};
+
 static int cf_check aplic_irq_xlate(const uint32_t *intspec,
                                     unsigned int intsize,
                                     unsigned int *out_hwirq,
@@ -366,7 +370,7 @@ static int __init aplic_preinit(struct dt_device_node *node, const void *dat)
 
     dt_irq_xlate = aplic_irq_xlate;
 
-    register_intc_ops(&aplic_ops);
+    register_intc_ops(&aplic_init_ops);
 
     /* Enable supervisor external interrupt */
     csr_set(CSR_SIE, BIT(IRQ_S_EXT, UL));
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index 675f703ec9..d7b34fc15a 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -28,8 +28,6 @@ struct intc_info {
 struct intc_hw_operations {
     /* Hold intc hw information */
     const struct intc_info *info;
-    /* Initialize the intc and the boot CPU */
-    int (*init)(void);
 
     /* hw_irq_controller to enable/disable/eoi host irq */
     const struct hw_interrupt_type *host_irq_type;
@@ -43,9 +41,15 @@ struct intc_hw_operations {
     void (*handle_interrupt)(struct cpu_user_regs *regs);
 };
 
+struct intc_hw_init_ops {
+    const struct intc_hw_operations *ops;
+    /* Initialize the intc and the boot CPU */
+    int (*init)(void);
+};
+
 void intc_preinit(void);
 
-void register_intc_ops(const struct intc_hw_operations *ops);
+void register_intc_ops(const struct intc_hw_init_ops *init_ops);
 
 void intc_init(void);
 
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index ea317aea5a..3600d23bdb 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -12,9 +12,12 @@
 
 static const struct intc_hw_operations *__ro_after_init intc_hw_ops;
 
-void __init register_intc_ops(const struct intc_hw_operations *ops)
+static const struct intc_hw_init_ops *__initdata intc_hw_init_ops;
+
+void __init register_intc_ops(const struct intc_hw_init_ops *init_ops)
 {
-    intc_hw_ops = ops;
+    intc_hw_ops = init_ops->ops;
+    intc_hw_init_ops = init_ops;
 }
 
 void __init intc_preinit(void)
@@ -27,7 +30,9 @@ void __init intc_preinit(void)
 
 void __init intc_init(void)
 {
-    if ( intc_hw_ops->init() )
+    ASSERT(intc_hw_init_ops && intc_hw_init_ops->init);
+
+    if ( intc_hw_init_ops->init() )
         panic("Failed to initialize the interrupt controller drivers\n");
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:23:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:23:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427518.1650267 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzu-0003fa-Cy; Mon, 21 Sep 2026 13:23:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427518.1650267; Mon, 21 Sep 2026 13:23:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8dzu-0003fS-AT; Mon, 21 Sep 2026 13:23:54 +0000
Received: by outflank-mailman (input) for mailman id 1427518;
 Mon, 21 Sep 2026 13:23:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8dzt-0003fM-Rf
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:23:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzt-008xXB-1d
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8dzt-008uGY-2a
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:23:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=M39UE3qqND+qlPR9EQw9G+zm4dAnX9wiMvJdHSiqmCQ=; b=sDFfvxaeVLWPv1wKe+B/wV+DkT
	NZouk8fx9oBi+SmWPkdfSbaTRMoE8RxpY1VwiGK5S7KXaiUPrMovVObIEk5GiK+k/Lh0m2/oMdFkY
	WJidxDeWkaVN+3p8xXxAZSU57zW+tU5jf6BxcMcYsRiiiJQ+2KGJd7Zu8yOj2TDCxJZo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: implement make_intc_domU_node()
Message-Id: <E1x8dzt-008uGY-2a@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:23:53 +0000

commit ff930346ef7943df4e157a6d5a32ae21ec8ac090
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:27 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:07:55 2026 +0200

    xen/riscv: implement make_intc_domU_node()
    
    Introduce a RISC-V specific function to create an interrupt controller
    Device Tree node for DomU domains during dom0less build.
    
    Add make_intc_domU_node() to the dom0less build path and wire it to
    a new generic helper, intc_make_domu_dt_node(), which delegates DT
    node creation to the active interrupt controller implementation via
    vintc_init_ops.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/domain.h |  2 ++
 xen/arch/riscv/include/asm/intc.h   | 10 ++++++++++
 xen/arch/riscv/intc.c               |  8 ++++++++
 3 files changed, 20 insertions(+)

diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/asm/domain.h
index 8ae01a5e4d..bd43ed08c2 100644
--- a/xen/arch/riscv/include/asm/domain.h
+++ b/xen/arch/riscv/include/asm/domain.h
@@ -97,6 +97,8 @@ struct arch_domain {
     struct paging_domain paging;
 
     const unsigned long *isa;
+
+    struct vintc *vintc;
 };
 
 #include <xen/sched.h>
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index d7b34fc15a..a4e678fad9 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -16,6 +16,7 @@ enum intc_variant {
 
 struct cpu_user_regs;
 struct irq_desc;
+struct kernel_info;
 
 struct intc_info {
     enum intc_variant hw_variant;
@@ -47,6 +48,15 @@ struct intc_hw_init_ops {
     int (*init)(void);
 };
 
+struct vintc_init_ops {
+    /* Create interrupt controller node for domain */
+    int (*make_domu_dt_node)(struct kernel_info *kinfo);
+};
+
+struct vintc {
+    const struct vintc_init_ops *init_ops;
+};
+
 void intc_preinit(void);
 
 void register_intc_ops(const struct intc_hw_init_ops *init_ops);
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index 3600d23bdb..e63da5e22e 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -3,6 +3,7 @@
 #include <xen/acpi.h>
 #include <xen/bug.h>
 #include <xen/device_tree.h>
+#include <xen/fdt-kernel.h>
 #include <xen/init.h>
 #include <xen/irq.h>
 #include <xen/lib.h>
@@ -72,3 +73,10 @@ void intc_route_irq_to_xen(struct irq_desc *desc, unsigned int priority)
     intc_set_irq_type(desc, desc->arch.type);
     intc_set_irq_priority(desc, priority);
 }
+
+int __init make_intc_domU_node(struct kernel_info *kinfo)
+{
+    const struct vintc *vintc = kinfo->bd.d->arch.vintc;
+
+    return vintc->init_ops->make_domu_dt_node(kinfo);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:24:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:24:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427520.1650271 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e05-0003hk-Em; Mon, 21 Sep 2026 13:24:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427520.1650271; Mon, 21 Sep 2026 13:24:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e05-0003hY-C2; Mon, 21 Sep 2026 13:24:05 +0000
Received: by outflank-mailman (input) for mailman id 1427520;
 Mon, 21 Sep 2026 13:24:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e03-0003hM-UO
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:24:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e03-008xXY-1u
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e03-008vql-2s
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=4INkMAUu7IboaP40gVc7SMdQ3NgfBwl44waeNfmgPGk=; b=Azt34xUD5v3Q+24G6yaLhoFp73
	6FPQ7YjYaxQjLFDQ/nB8D7hKnuHL1okxbtTkgGBxCfbRQXXRUtE5itKuFmmoWo65W0qjmtsNaCAFp
	j9FydIdNgqR9sRjt+eVdA8blgVTz3no0bi6ELD/Mfyny5xwHukzy91Elfb4A31rdevp8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce aia_init() and aia_usable()
Message-Id: <E1x8e03-008vql-2s@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:24:03 +0000

commit 24a61ce26482e964bf58f4ed8160bc5c27bf4ad5
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:28 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:09 2026 +0200

    xen/riscv: introduce aia_init() and aia_usable()
    
    aia_init() is going to contain all the logic related to AIA initialization.
    
    At the moment, it only checks whether the SSAIA extension is available,
    and if so, sets is_aia_usable (which  indicates more than just the
    availability of the extension) to true; it also signifies that the necessary
    components (to be introduced in follow-up patches) have been initialized.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/Makefile          |  1 +
 xen/arch/riscv/aia.c             | 23 +++++++++++++++++++++++
 xen/arch/riscv/include/asm/aia.h | 10 ++++++++++
 xen/arch/riscv/intc.c            |  3 +++
 4 files changed, 37 insertions(+)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 2d24670dfc..8e7a6370ee 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,3 +1,4 @@
+obj-y += aia.o
 obj-y += aplic.o
 obj-y += cpufeature.o
 obj-y += domain.o
diff --git a/xen/arch/riscv/aia.c b/xen/arch/riscv/aia.c
new file mode 100644
index 0000000000..e31c9c2d24
--- /dev/null
+++ b/xen/arch/riscv/aia.c
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <xen/errno.h>
+#include <xen/init.h>
+#include <xen/sections.h>
+#include <xen/types.h>
+
+#include <asm/cpufeature.h>
+
+static bool __ro_after_init _aia_usable;
+
+bool aia_usable(void)
+{
+    return _aia_usable;
+}
+
+void __init aia_init(void)
+{
+    if ( !riscv_isa_extension_available(NULL, RISCV_ISA_EXT_ssaia) )
+        return;
+
+    _aia_usable = true;
+}
diff --git a/xen/arch/riscv/include/asm/aia.h b/xen/arch/riscv/include/asm/aia.h
new file mode 100644
index 0000000000..aaa4bf91fc
--- /dev/null
+++ b/xen/arch/riscv/include/asm/aia.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef RISCV_AIA_H
+#define RISCV_AIA_H
+
+bool aia_usable(void);
+
+void aia_init(void);
+
+#endif /* RISCV_AIA_H */
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index e63da5e22e..2864a896b6 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -9,6 +9,7 @@
 #include <xen/lib.h>
 #include <xen/spinlock.h>
 
+#include <asm/aia.h>
 #include <asm/intc.h>
 
 static const struct intc_hw_operations *__ro_after_init intc_hw_ops;
@@ -33,6 +34,8 @@ void __init intc_init(void)
 {
     ASSERT(intc_hw_init_ops && intc_hw_init_ops->init);
 
+    aia_init();
+
     if ( intc_hw_init_ops->init() )
         panic("Failed to initialize the interrupt controller drivers\n");
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:24:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:24:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427521.1650275 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0F-0003ji-Fs; Mon, 21 Sep 2026 13:24:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427521.1650275; Mon, 21 Sep 2026 13:24:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0F-0003ja-DL; Mon, 21 Sep 2026 13:24:15 +0000
Received: by outflank-mailman (input) for mailman id 1427521;
 Mon, 21 Sep 2026 13:24:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e0E-0003jQ-0v
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:24:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0D-008xXk-2B
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0D-008xOO-38
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=7mOiOL41e0bUml2435A7off2TJfkK3m0XVlw9geK3E0=; b=EwBzkZQP9WvTRWkyOm+vl2Eeq4
	MY5oGz2nRj6gyZrqPanlpQXkRSU5kgPkCUv4woQKv5CKax5SJestc8Astb1/ARA6/l9OLstzsgFZT
	JwHQBljIfZA2xc8CRYSjqjVbMJhQaC9vAy85Jk61xnskp7UEOx8k2OTYUHJxUuoJ1kRc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce per-vCPU IMSIC state
Message-Id: <E1x8e0D-008xOO-38@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:24:13 +0000

commit bbbe70852ad45713e73420150711e263aa48ee2f
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:29 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:21 2026 +0200

    xen/riscv: introduce per-vCPU IMSIC state
    
    Each vCPU interacting with the IMSIC requires state to track the
    associated guest interrupt file and its backing context.
    
    Introduce a per-vCPU structure to hold IMSIC-related state, including
    the guest interrupt file identifier and the CPU providing the backing
    VS-file. Access to the guest file identifier is protected by a lock.
    
    Initialize this structure during vCPU setup and store it in arch_vcpu.
    The initial state marks the VS-file as software-backed until it becomes
    associated with a physical CPU.
    
    Add helper to retrieve the guest interrupt file identifier:
    - vcpu_guest_file_id() is going to be used during update of APLIC's
      target register with the pair of information <guest_file_id, cpu_id>
      (to have MSI delivery mode work properly) when guest is trying to
      access vAPLIC's target register.
    It will be used in the follow up patches.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/imsic.c              | 35 +++++++++++++++++++++++++++++++++++
 xen/arch/riscv/include/asm/domain.h |  2 ++
 xen/arch/riscv/include/asm/imsic.h  | 22 ++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index 8da72c0072..4a2ef5069d 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -16,6 +16,7 @@
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/macros.h>
+#include <xen/sched.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
 #include <xen/xvmalloc.h>
@@ -56,6 +57,11 @@ do {                            \
     csr_clear(CSR_SIREG, v);    \
 } while (0)
 
+unsigned int vcpu_guest_file_id(const struct vcpu *v)
+{
+    return ACCESS_ONCE(v->arch.vimsic_state->guest_file_id);
+}
+
 void __init imsic_ids_local_delivery(bool enable)
 {
     if ( enable )
@@ -312,6 +318,35 @@ static int imsic_parse_node(const struct dt_device_node *node,
     return 0;
 }
 
+int vcpu_imsic_init(struct vcpu *v)
+{
+    struct vimsic_state *imsic_state;
+
+    /* Allocate IMSIC context */
+    imsic_state = xvzalloc(struct vimsic_state);
+    if ( !imsic_state )
+        return -ENOMEM;
+
+    /* Setup IMSIC context  */
+    rwlock_init(&imsic_state->vsfile_lock);
+
+    /*
+     * xvzalloc() already cleared the context, so guest_file_id == 0, i.e. the
+     * always-available s/w IMSIC VS-file. Only vsfile_cpu needs an explicit
+     * initializer as its s/w VS-file value is NR_CPUS rather than 0.
+     */
+    imsic_state->vsfile_cpu = NR_CPUS;
+
+    v->arch.vimsic_state = imsic_state;
+
+    return 0;
+}
+
+void vcpu_imsic_deinit(struct vcpu *v)
+{
+    XVFREE(v->arch.vimsic_state);
+}
+
 /*
  * Initialize the imsic_cfg structure based on the IMSIC DT node.
  *
diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/asm/domain.h
index bd43ed08c2..e035b33ddf 100644
--- a/xen/arch/riscv/include/asm/domain.h
+++ b/xen/arch/riscv/include/asm/domain.h
@@ -54,6 +54,8 @@ struct arch_vcpu {
 
     struct vtimer vtimer;
 
+    struct vimsic_state *vimsic_state;
+
     register_t hcounteren;
     register_t hedeleg;
     register_t hideleg;
diff --git a/xen/arch/riscv/include/asm/imsic.h b/xen/arch/riscv/include/asm/imsic.h
index c6c59215df..5ee954bbf3 100644
--- a/xen/arch/riscv/include/asm/imsic.h
+++ b/xen/arch/riscv/include/asm/imsic.h
@@ -11,6 +11,7 @@
 #ifndef ASM_RISCV_IMSIC_H
 #define ASM_RISCV_IMSIC_H
 
+#include <xen/rwlock.h>
 #include <xen/spinlock.h>
 #include <xen/stdbool.h>
 #include <xen/types.h>
@@ -61,7 +62,24 @@ struct imsic_config {
     spinlock_t lock;
 };
 
+struct vimsic_state {
+    /* IMSIC VS-file */
+    rwlock_t vsfile_lock;
+    /*
+     * s/w IMSIC VS-file -> guest_file_id == 0
+     * h/w IMSIC VS-file -> guest_file_id > 0
+     */
+    unsigned int guest_file_id;
+    /*
+     * s/w IMSIC VS-file -> vsfile_cpu == NR_CPUS
+     * h/w IMSIC VS-file -> vsfile_cpu < NR_CPUS
+     */
+    unsigned int vsfile_cpu;
+};
+
 struct dt_device_node;
+struct vcpu;
+
 int imsic_init(const struct dt_device_node *node);
 
 const struct imsic_config *imsic_get_config(void);
@@ -71,4 +89,8 @@ void imsic_irq_disable(unsigned int hwirq);
 
 void imsic_ids_local_delivery(bool enable);
 
+int vcpu_imsic_init(struct vcpu *v);
+void vcpu_imsic_deinit(struct vcpu *v);
+unsigned int vcpu_guest_file_id(const struct vcpu *v);
+
 #endif /* ASM_RISCV_IMSIC_H */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:24:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:24:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427522.1650279 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0P-0003lU-HS; Mon, 21 Sep 2026 13:24:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427522.1650279; Mon, 21 Sep 2026 13:24:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0P-0003lM-Eg; Mon, 21 Sep 2026 13:24:25 +0000
Received: by outflank-mailman (input) for mailman id 1427522;
 Mon, 21 Sep 2026 13:24:24 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e0O-0003lG-43
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:24:24 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0N-008xXs-2U
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0O-008yfi-0D
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=4hxNi3k2atg6Ei0/sGiXVsg/e7Yr3D6gxKileb/KQEg=; b=kJdGhLtkK5Z9MuQJvXEzgxVRVU
	WPRmFx9tCOsGivl2MkLjI5iNHGzxMCK3/ZheNj6eJAaObVG4eVyKYvIXZPXh6Czm4qhfcXaQZ5QbP
	Pbl7LYjU/ifK6ToMew6ruln+ClG1Lrt5PdfT2GA/i4Y6KAi1cOAM/oQ8sTe1CV2QJEXQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure
Message-Id: <E1x8e0O-008yfi-0D@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:24:24 +0000

commit 9164a97efbeb57a8e53b129189223abb8cbc4250
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:30 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:35 2026 +0200

    xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure
    
    At the current development stage, only domain vINTC init and deinit
    operations are required, so implement those first.
    
    Initialize vAPLIC's domaincfg to with the interrupt-enable bit set and
    MSI delivery mode selected as the current solution is exepcted to have
    always IMSIC, and initialize vintc->ops.
    
    Other operations such as emulate_load(), emulate_store(), and is_access()
    will be needed once guests are running and MMIO accesses to APLIC MMIO
    range must be handled. These will be introduced separately later.
    
    Introduce a structure to describe a virtual interrupt controller (vINTC)
    and a vintc_ops structure, which provides operations to emulate load and
    store accesses to interrupt controller MMIOs and to check whether a given
    address falls within the MMIO range of a specific virtual interrupt
    controller.
    Note that already existed init_ops field in struct vintc will be init-ed
    for APLIC in the follow up patch.
    
    The vAPLIC implementation of these operations will be provided later
    once guests can be run and these operations are actually needed.
    
    Introduce these structures here as they are required for the implementation
    of domain_vaplic_init() and domain_vaplic_alloc(). Also, introduce
    vaplic_init() and init vintc_ops->vcpu_init() with it.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/Makefile             |  1 +
 xen/arch/riscv/domain.c             | 11 +++-----
 xen/arch/riscv/imsic.c              |  4 +--
 xen/arch/riscv/include/asm/aplic.h  |  7 +++++
 xen/arch/riscv/include/asm/intc.h   | 12 +++++++++
 xen/arch/riscv/include/asm/vaplic.h | 34 ++++++++++++++++++++++++
 xen/arch/riscv/vaplic.c             | 52 +++++++++++++++++++++++++++++++++++++
 7 files changed, 111 insertions(+), 10 deletions(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 8e7a6370ee..fcd73c7a2d 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -25,6 +25,7 @@ obj-y += smpboot.o
 obj-y += stubs.o
 obj-y += time.o
 obj-y += traps.o
+obj-y += vaplic.o
 obj-y += vmid.o
 obj-y += vm_event.o
 obj-y += vsbi/
diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c
index c993314759..45712d3059 100644
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -11,6 +11,7 @@
 #include <asm/bitops.h>
 #include <asm/cpufeature.h>
 #include <asm/csr.h>
+#include <asm/intc.h>
 #include <asm/riscv_encoding.h>
 #include <asm/vtimer.h>
 
@@ -155,14 +156,8 @@ int arch_vcpu_create(struct vcpu *v)
     if ( (rc = vcpu_vtimer_init(v)) )
         goto fail;
 
-    /*
-     * As interrupt controller (IC) is not yet implemented,
-     * return an error.
-     *
-     * TODO: Drop this once IC is implemented.
-     */
-    rc = -EOPNOTSUPP;
-    goto fail;
+    if ( (rc = v->domain->arch.vintc->ops->vcpu_init(v)) )
+        goto fail;
 
     return rc;
 
diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index 4a2ef5069d..809f29af86 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -318,7 +318,7 @@ static int imsic_parse_node(const struct dt_device_node *node,
     return 0;
 }
 
-int vcpu_imsic_init(struct vcpu *v)
+int cf_check vcpu_imsic_init(struct vcpu *v)
 {
     struct vimsic_state *imsic_state;
 
@@ -342,7 +342,7 @@ int vcpu_imsic_init(struct vcpu *v)
     return 0;
 }
 
-void vcpu_imsic_deinit(struct vcpu *v)
+void cf_check vcpu_imsic_deinit(struct vcpu *v)
 {
     XVFREE(v->arch.vimsic_state);
 }
diff --git a/xen/arch/riscv/include/asm/aplic.h b/xen/arch/riscv/include/asm/aplic.h
index b0724fe6f3..5a7fcb6ec4 100644
--- a/xen/arch/riscv/include/asm/aplic.h
+++ b/xen/arch/riscv/include/asm/aplic.h
@@ -15,8 +15,15 @@
 
 #include <asm/imsic.h>
 
+/*
+ * domaincfg read-only fields (AIA spec):
+ *  - bits [31:24] -> read-only 0x80
+ *  - bit 7        -> read-only 0
+ */
+#define APLIC_DOMAINCFG_RO      (0x80U << 24)
 #define APLIC_DOMAINCFG_IE      BIT(8, U)
 #define APLIC_DOMAINCFG_DM      BIT(2, U)
+#define APLIC_DOMAINCFG_BE      BIT(0, U)
 
 #define APLIC_SOURCECFG_SM_INACTIVE     0x0
 #define APLIC_SOURCECFG_SM_DETACH       0x1
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index a4e678fad9..8757288852 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -17,6 +17,7 @@ enum intc_variant {
 struct cpu_user_regs;
 struct irq_desc;
 struct kernel_info;
+struct vcpu;
 
 struct intc_info {
     enum intc_variant hw_variant;
@@ -53,8 +54,19 @@ struct vintc_init_ops {
     int (*make_domu_dt_node)(struct kernel_info *kinfo);
 };
 
+struct vintc_ops {
+    /* Initialize some vINTC-related stuff for a vCPU */
+    int (*vcpu_init)(struct vcpu *v);
+
+    /* Deinitialize some vINTC-related stuff for a vCPU */
+    void (*vcpu_deinit)(struct vcpu *v);
+};
+
 struct vintc {
+    /* Callbacks invoked during domain construction only. */
     const struct vintc_init_ops *init_ops;
+    /* Runtime callbacks used for the lifetime of the guest. */
+    const struct vintc_ops *ops;
 };
 
 void intc_preinit(void);
diff --git a/xen/arch/riscv/include/asm/vaplic.h b/xen/arch/riscv/include/asm/vaplic.h
new file mode 100644
index 0000000000..96080bfbc2
--- /dev/null
+++ b/xen/arch/riscv/include/asm/vaplic.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * xen/arch/riscv/vaplic.c
+ *
+ * Virtual RISC-V Advanced Platform-Level Interrupt Controller support
+ *
+ * Copyright (c) Microchip.
+ */
+
+#ifndef ASM__RISCV__VAPLIC_H
+#define ASM__RISCV__VAPLIC_H
+
+#include <xen/kernel.h>
+#include <xen/types.h>
+
+#include <asm/intc.h>
+
+struct domain;
+
+#define to_vaplic(d) container_of((d)->arch.vintc, struct vaplic, vintc)
+
+struct vaplic_regs {
+    uint32_t domaincfg;
+};
+
+struct vaplic {
+    struct vintc vintc;
+    struct vaplic_regs regs;
+};
+
+int domain_vaplic_init(struct domain *d);
+void domain_vaplic_deinit(struct domain *d);
+
+#endif /* ASM__RISCV__VAPLIC_H */
diff --git a/xen/arch/riscv/vaplic.c b/xen/arch/riscv/vaplic.c
new file mode 100644
index 0000000000..c9f188b989
--- /dev/null
+++ b/xen/arch/riscv/vaplic.c
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * xen/arch/riscv/vaplic.c
+ *
+ * Virtual RISC-V Advanced Platform-Level Interrupt Controller support
+ *
+ * Copyright (c) Microchip.
+ * Copyright (c) Vates
+ */
+
+#include <xen/errno.h>
+#include <xen/sched.h>
+#include <xen/xvmalloc.h>
+
+#include <asm/aia.h>
+#include <asm/imsic.h>
+#include <asm/intc.h>
+#include <asm/vaplic.h>
+
+#include "aplic-priv.h"
+
+static const struct vintc_ops vintc_ops = {
+    .vcpu_init = vcpu_imsic_init,
+    .vcpu_deinit = vcpu_imsic_deinit,
+};
+
+int domain_vaplic_init(struct domain *d)
+{
+    struct vaplic *vaplic = xvzalloc(struct vaplic);
+
+    if ( !vaplic )
+        return -ENOMEM;
+
+    d->arch.vintc = &vaplic->vintc;
+    d->arch.vintc->ops = &vintc_ops;
+
+    vaplic->regs.domaincfg = APLIC_DOMAINCFG_RO;
+
+    return 0;
+}
+
+void domain_vaplic_deinit(struct domain *d)
+{
+    struct vaplic *vaplic;
+
+    if ( !d->arch.vintc )
+        return;
+
+    vaplic = to_vaplic(d);
+    d->arch.vintc = NULL;
+    xvfree(vaplic);
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:24:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:24:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427523.1650282 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0Z-0003o7-KC; Mon, 21 Sep 2026 13:24:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427523.1650282; Mon, 21 Sep 2026 13:24:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0Z-0003nz-HZ; Mon, 21 Sep 2026 13:24:35 +0000
Received: by outflank-mailman (input) for mailman id 1427523;
 Mon, 21 Sep 2026 13:24:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e0Y-0003no-79
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:24:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0X-008xY0-2n
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0Y-00904f-0W
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MT8C3JSO4JHjgOuHJTDwcmwa4KipSJdu23abUCKQ11E=; b=H+YrEA0jAXkiXJgRX1baZW9tuT
	hwddXqSGDq5Kqtt2EWkVQrZXplwwGd3q3eb2YXub0yyCt0YjPXO/Exb/CdaXVMMhaV+UsgrPW9J0o
	WDaxgc4Y6TAfGivdOeuDwAneEjP85CArWmEtYX9WII+mu41kG2ptTM/7tkFLj0kPl6g0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce (de)initialization helpers for vINTC
Message-Id: <E1x8e0Y-00904f-0W@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:24:34 +0000

commit 68ca2185e0fb316fd55a5df567f4f6768aec9c9e
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:31 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:08:47 2026 +0200

    xen/riscv: introduce (de)initialization helpers for vINTC
    
    Add common helpers domain_vintc_init() and domain_vintc_deinit() to
    allocate and deallocate a virtual interrupt controller (vINTC)
    structure and initialize basic virtual interrupt controller registers.
    
    domain_vintc_deinit() isn't called at the moment as arch_domain_destroy()
    is implemented as stub at the moment.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/domain.c           |  7 ++++++-
 xen/arch/riscv/include/asm/intc.h |  3 +++
 xen/arch/riscv/intc.c             | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/xen/arch/riscv/domain.c b/xen/arch/riscv/domain.c
index 45712d3059..d94652809e 100644
--- a/xen/arch/riscv/domain.c
+++ b/xen/arch/riscv/domain.c
@@ -291,7 +291,9 @@ int arch_sanitise_domain_config(struct xen_domctl_createdomain *config)
 
 void arch_domain_destroy(struct domain *d)
 {
-    printk(XENLOG_WARNING "%s: unimplemented\n", __func__);
+    printk(XENLOG_WARNING "%s: not fully implemented\n", __func__);
+
+    domain_vintc_deinit(d);
 }
 
 int arch_domain_create(struct domain *d,
@@ -308,6 +310,9 @@ int arch_domain_create(struct domain *d,
     if ( (rc = p2m_init(d, config)) != 0)
         goto fail;
 
+    if ( (rc = domain_vintc_init(d)) )
+        goto fail;
+
     return rc;
 
  fail:
diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm/intc.h
index 8757288852..6fc0e620e9 100644
--- a/xen/arch/riscv/include/asm/intc.h
+++ b/xen/arch/riscv/include/asm/intc.h
@@ -79,4 +79,7 @@ void intc_route_irq_to_xen(struct irq_desc *desc, unsigned int priority);
 
 void intc_handle_external_irqs(struct cpu_user_regs *regs);
 
+int domain_vintc_init(struct domain *d);
+void domain_vintc_deinit(struct domain *d);
+
 #endif /* ASM__RISCV__INTERRUPT_CONTOLLER_H */
diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c
index 2864a896b6..f5c8af6dde 100644
--- a/xen/arch/riscv/intc.c
+++ b/xen/arch/riscv/intc.c
@@ -11,6 +11,7 @@
 
 #include <asm/aia.h>
 #include <asm/intc.h>
+#include <asm/vaplic.h>
 
 static const struct intc_hw_operations *__ro_after_init intc_hw_ops;
 
@@ -83,3 +84,37 @@ int __init make_intc_domU_node(struct kernel_info *kinfo)
 
     return vintc->init_ops->make_domu_dt_node(kinfo);
 }
+
+int domain_vintc_init(struct domain *d)
+{
+    int ret = -EOPNOTSUPP;
+    const enum intc_variant variant = intc_hw_ops->info->hw_variant;
+
+    switch ( variant )
+    {
+    case INTC_APLIC:
+        ret = domain_vaplic_init(d);
+        break;
+
+    default:
+        printk_once("vintc (variant:%d) isn't implemented\n", variant);
+        break;
+    }
+
+    return ret;
+}
+
+void domain_vintc_deinit(struct domain *d)
+{
+    const enum intc_variant variant = intc_hw_ops->info->hw_variant;
+
+    switch ( variant )
+    {
+    case INTC_APLIC:
+        domain_vaplic_deinit(d);
+        break;
+
+    default:
+        break;
+    }
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:24:51 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:24:51 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427525.1650296 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0j-00044m-S4; Mon, 21 Sep 2026 13:24:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427525.1650296; Mon, 21 Sep 2026 13:24:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0j-00044e-PA; Mon, 21 Sep 2026 13:24:45 +0000
Received: by outflank-mailman (input) for mailman id 1427525;
 Mon, 21 Sep 2026 13:24:44 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e0i-000444-A4
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:24:44 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0h-008xYh-35
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0i-0091UK-0p
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MUvWyIW8xNJJ4efA+Z99AxzEM598dMSqR27Zy6Djwe8=; b=RjSCfWevN1dSA64ZAHAK4m1AeP
	+5wGJWGLDuUxddItedPSdaDqJTKj2bH4CYQO8utT5Q6VlrMMxQPd86JPN+10ktAOp4QR4fo3i+VEY
	4MNCgK54D0cAgiDE9FG0qbrW6rqq94SSQGcV0RtKPsissgGkWV05c7eXvYEwfcUZAqP4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: generate IMSIC DT node for guest domains
Message-Id: <E1x8e0i-0091UK-0p@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:24:44 +0000

commit 3559e12585322e534cfd2bb27d0fcb6ff4d1834d
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:32 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:09:00 2026 +0200

    xen/riscv: generate IMSIC DT node for guest domains
    
    Guests using the IMSIC interrupt controller require a corresponding
    Device Tree description.
    
    Add support for generating an IMSIC node when building the guest DT.
    This allows guests to discover and use the IMSIC interrupt controller.
    
    The value choosen for GUEST_IMSIC_S_BASE is an address which is typically
    used for IMSIC and QEMU.
    
    DT-building functions are marked __init because domain creation happens at
    boot time, before the init sections are freed. In a typical deployment
    libxl creates the interrupt controller node in userspace and hands the
    complete FDT to Xen, so these functions are only called during early
    domain construction.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/imsic.c                    | 143 +++++++++++++++++++++++++++++-
 xen/arch/riscv/include/asm/guest-layout.h |   6 ++
 xen/arch/riscv/include/asm/imsic.h        |   3 +
 3 files changed, 151 insertions(+), 1 deletion(-)

diff --git a/xen/arch/riscv/imsic.c b/xen/arch/riscv/imsic.c
index 809f29af86..44b8640ea3 100644
--- a/xen/arch/riscv/imsic.c
+++ b/xen/arch/riscv/imsic.c
@@ -13,8 +13,12 @@
 #include <xen/const.h>
 #include <xen/cpumask.h>
 #include <xen/device_tree.h>
+#include <xen/domain.h>
 #include <xen/errno.h>
+#include <xen/fdt-domain-build.h>
+#include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/macros.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
@@ -34,6 +38,21 @@ static struct imsic_config imsic_cfg = {
     .lock = SPIN_LOCK_UNLOCKED,
 };
 
+/*
+ * Number of MSIs available to a guest. Determined by the host interrupt
+ * controller, so it is identical for every domain -- hence a single global
+ * rather than a per-domain value.
+ */
+static unsigned int __ro_after_init guest_num_msis;
+
+#define GUEST_IMSIC_COMPATIBLE "riscv,imsics"
+
+/*
+ * Value is inspired by what QEMU is using for riscv,num-ids property for IMSIC
+ * node.
+ */
+#define GUEST_IMSIC_MAX_MSIS 255U
+
 #define IMSIC_DISABLE_EIDELIVERY    0
 #define IMSIC_ENABLE_EIDELIVERY     1
 #define IMSIC_DISABLE_EITHRESHOLD   1
@@ -182,7 +201,7 @@ static int __init imsic_get_parent_hartid(const struct dt_device_node *node,
  * or IRQ_M_EXT if the IMSIC node corresponds to a machine-mode IMSIC,
  * which should be ignored by the hypervisor.
  */
-static int imsic_parse_node(const struct dt_device_node *node,
+static int __init imsic_parse_node(const struct dt_device_node *node,
                             unsigned int *nr_parent_irqs,
                             unsigned int *nr_mmios)
 {
@@ -285,6 +304,11 @@ static int imsic_parse_node(const struct dt_device_node *node,
         return -ENOENT;
     }
 
+    if ( dt_property_read_u32(node, "riscv,num-guest-ids", &tmp) )
+        guest_num_msis = min(GUEST_IMSIC_MAX_MSIS, tmp);
+    else
+        guest_num_msis = GUEST_IMSIC_MAX_MSIS;
+
     if ( (imsic_cfg.nr_ids < IMSIC_MIN_ID) ||
          (imsic_cfg.nr_ids > IMSIC_MAX_ID) )
     {
@@ -526,3 +550,120 @@ int __init imsic_init(const struct dt_device_node *node)
 
     return rc;
 }
+
+static int __init guest_imsic_make_reg_property(struct domain *d, void *fdt)
+{
+    paddr_t size = IMSIC_MMIO_PAGE_SZ * d->max_vcpus;
+    __be32 regs[4] = {
+        cpu_to_be32(GUEST_IMSIC_S_BASE >> 32),
+        cpu_to_be32(GUEST_IMSIC_S_BASE),
+        cpu_to_be32(size >> 32),
+        cpu_to_be32(size),
+    };
+
+    return fdt_property(fdt, "reg", regs, sizeof(regs));
+}
+
+static int __init guest_imsic_set_interrupt_extended_prop(struct domain *d,
+                                                          void *fdt)
+{
+    unsigned int cpu, pos = 0;
+    __be32 *irq_ext;
+    int res;
+
+    irq_ext = xvzalloc_array(__be32, d->max_vcpus * 2);
+    if ( !irq_ext )
+        return -ENOMEM;
+
+    for ( cpu = 0; cpu < d->max_vcpus; cpu++ )
+    {
+        char buf[64];
+        uint32_t phandle;
+
+        snprintf(buf, ARRAY_SIZE(buf), "/cpus/cpu@%u/interrupt-controller", cpu);
+        phandle = fdt_get_phandle(fdt, fdt_path_offset(fdt, buf));
+
+        if ( !phandle )
+        {
+            res = -ENODEV;
+            goto out;
+        }
+
+        irq_ext[pos++] = cpu_to_be32(phandle);
+        irq_ext[pos++] = cpu_to_be32(IRQ_S_EXT);
+    }
+
+    res = fdt_property(fdt, "interrupts-extended", irq_ext,
+                       d->max_vcpus * 2 * sizeof(*irq_ext));
+
+ out:
+    xvfree(irq_ext);
+
+    return res;
+}
+
+int __init vimsic_make_domu_dt_node(struct kernel_info *kinfo,
+                                    unsigned int *phandle)
+{
+    int res;
+    void *fdt = kinfo->fdt;
+    char vimsic_name[32];
+    unsigned int vimsic_phandle;
+
+    res = snprintf(vimsic_name, ARRAY_SIZE(vimsic_name), "/soc/imsic@%lx",
+                   GUEST_IMSIC_S_BASE);
+    if ( res >= ARRAY_SIZE(vimsic_name) )
+    {
+        dprintk(XENLOG_DEBUG, "vimsic name is truncated\n");
+        return -ENOBUFS;
+    }
+
+    res = fdt_begin_node(fdt, vimsic_name);
+    if ( res )
+        return res;
+
+    res = fdt_property_string(fdt, "compatible", GUEST_IMSIC_COMPATIBLE);
+    if ( res )
+        return res;
+
+    res = guest_imsic_make_reg_property(kinfo->bd.d, fdt);
+    if ( res )
+        return res;
+
+    res = guest_imsic_set_interrupt_extended_prop(kinfo->bd.d, fdt);
+    if ( res )
+        return res;
+
+    res = fdt_property_u32(fdt, "riscv,num-ids", guest_num_msis);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "msi-controller", NULL, 0);
+    if ( res )
+        return res;
+
+    res = fdt_property_u32(fdt, "#msi-cells", 0);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "interrupt-controller", NULL, 0);
+    if ( res )
+        return res;
+
+    res = fdt_property_u32(fdt, "#interrupt-cells", 0);
+    if ( res )
+        return res;
+
+    vimsic_phandle = alloc_phandle(kinfo);
+    if ( !vimsic_phandle )
+        return -EOVERFLOW;
+
+    res = fdt_property_cell(fdt, "phandle", vimsic_phandle);
+    if ( res )
+        return res;
+
+    if ( phandle )
+        *phandle = vimsic_phandle;
+
+    return fdt_end_node(fdt);
+}
diff --git a/xen/arch/riscv/include/asm/guest-layout.h b/xen/arch/riscv/include/asm/guest-layout.h
index 68d95a0939..5e566450bd 100644
--- a/xen/arch/riscv/include/asm/guest-layout.h
+++ b/xen/arch/riscv/include/asm/guest-layout.h
@@ -3,6 +3,12 @@
 
 #include <public/xen.h>
 
+/*
+ * Base address of the guest's supervisor-mode IMSIC. The value is the address
+ * typically used for IMSIC by QEMU.
+ */
+#define GUEST_IMSIC_S_BASE _UL(0x28000000)
+
 #define GUEST_RAM_BANKS   2
 
 /*
diff --git a/xen/arch/riscv/include/asm/imsic.h b/xen/arch/riscv/include/asm/imsic.h
index 5ee954bbf3..2425430ed1 100644
--- a/xen/arch/riscv/include/asm/imsic.h
+++ b/xen/arch/riscv/include/asm/imsic.h
@@ -78,6 +78,7 @@ struct vimsic_state {
 };
 
 struct dt_device_node;
+struct kernel_info;
 struct vcpu;
 
 int imsic_init(const struct dt_device_node *node);
@@ -93,4 +94,6 @@ int vcpu_imsic_init(struct vcpu *v);
 void vcpu_imsic_deinit(struct vcpu *v);
 unsigned int vcpu_guest_file_id(const struct vcpu *v);
 
+int vimsic_make_domu_dt_node(struct kernel_info *kinfo, unsigned int *phandle);
+
 #endif /* ASM_RISCV_IMSIC_H */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:24:55 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:24:55 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427527.1650301 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0t-0004AK-Tw; Mon, 21 Sep 2026 13:24:55 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427527.1650301; Mon, 21 Sep 2026 13:24:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e0t-0004A3-QX; Mon, 21 Sep 2026 13:24:55 +0000
Received: by outflank-mailman (input) for mailman id 1427527;
 Mon, 21 Sep 2026 13:24:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e0s-00048j-Cx
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:24:54 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0s-008xYp-09
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e0s-009361-17
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:24:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=dA4CNI83S5bOJAnMBOIWWTiu/w3TfrAWxfrsqCA76fM=; b=ivOJQ/w+C3aVsUw9OZvwSTew3X
	U2xbe/NJAAr+rQrHEg2v7bGf0sj0baw2M2ZqHMEUYxP0Cl8nHYS+d3Ur9z/PNGZ9EDYp6V7Hfj92G
	AL9for5uwlfcLFMx4NjAzooGKiZttCtAsvXlDmyY4Zm1XvG6nm4UH4r9Jk53eqny3Uxs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: create APLIC DT node for guest domains
Message-Id: <E1x8e0s-009361-17@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:24:54 +0000

commit 3ecc6da8d633d393d1e07b1c5971560ad62dd405
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Wed Sep 9 17:07:33 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:09:06 2026 +0200

    xen/riscv: create APLIC DT node for guest domains
    
    Guests require a Device Tree description of the interrupt controller
    topology. Add support for creating an APLIC node when building the
    guest DT.
    
    Provide stub for imsic_make_dt_node() it will be introduced properly
    in follow-up patch.
    
    The value chosen for GUEST_APLIC_S_BASE is based on QEMU one.
    
    DT-building functions are marked __init because domain creation happens at
    boot time, before the init sections are freed. In a typical deployment
    libxl creates the interrupt controller node in userspace and hands the
    complete FDT to Xen, so these functions are only called during early
    domain construction.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/aplic-priv.h               | 13 ++++++
 xen/arch/riscv/aplic.c                    |  2 +
 xen/arch/riscv/include/asm/aplic.h        |  8 ++++
 xen/arch/riscv/include/asm/guest-layout.h |  6 +++
 xen/arch/riscv/vaplic.c                   | 77 +++++++++++++++++++++++++++++++
 5 files changed, 106 insertions(+)

diff --git a/xen/arch/riscv/aplic-priv.h b/xen/arch/riscv/aplic-priv.h
index 85e0d028d1..35100d3a64 100644
--- a/xen/arch/riscv/aplic-priv.h
+++ b/xen/arch/riscv/aplic-priv.h
@@ -34,4 +34,17 @@ struct aplic_priv {
     const struct imsic_config *imsic_cfg;
 };
 
+/*
+ * Value is inspired by what QEMU is using for riscv,num-sources property for
+ * APLIC node.
+ */
+#define GUEST_APLIC_MAX_SOURCES 96U
+
+/*
+ * Specifies the number of interrupt sources supported by guest APLIC domain.
+ * Could be limited by host interrupt controller and is identical for every
+ * domain for now.
+ */
+extern unsigned int guest_aplic_num_sources;
+
 #endif /* ASM_RISCV_APLIC_PRIV_H */
diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c
index d08401db46..c2d7183e18 100644
--- a/xen/arch/riscv/aplic.c
+++ b/xen/arch/riscv/aplic.c
@@ -92,6 +92,8 @@ static int __init cf_check aplic_init(void)
         panic("%s: failed to get number of interrupt sources\n",
               node->full_name);
 
+    guest_aplic_num_sources = min(GUEST_APLIC_MAX_SOURCES, aplic_info.num_irqs);
+
     if ( aplic_info.num_irqs > ARRAY_SIZE(aplic.regs->sourcecfg) )
         aplic_info.num_irqs = ARRAY_SIZE(aplic.regs->sourcecfg);
 
diff --git a/xen/arch/riscv/include/asm/aplic.h b/xen/arch/riscv/include/asm/aplic.h
index 5a7fcb6ec4..07318aaac2 100644
--- a/xen/arch/riscv/include/asm/aplic.h
+++ b/xen/arch/riscv/include/asm/aplic.h
@@ -34,6 +34,14 @@
 
 #define APLIC_TARGET_HART_IDX_SHIFT 18
 
+#define APLIC_IDC_SIZE          32
+
+#define APLIC_MIN_SIZE          0x4000
+#define APLIC_SIZE_ALIGN(x)     ROUNDUP(x, APLIC_MIN_SIZE)
+
+#define APLIC_SIZE(nr_cpus)     (APLIC_MIN_SIZE + \
+                                 APLIC_SIZE_ALIGN(APLIC_IDC_SIZE * (nr_cpus)))
+
 struct aplic_regs {
     uint32_t domaincfg;         /* 0x0000 */
     uint32_t sourcecfg[1023];   /* 0x0004 */
diff --git a/xen/arch/riscv/include/asm/guest-layout.h b/xen/arch/riscv/include/asm/guest-layout.h
index 5e566450bd..90603f06bb 100644
--- a/xen/arch/riscv/include/asm/guest-layout.h
+++ b/xen/arch/riscv/include/asm/guest-layout.h
@@ -3,6 +3,12 @@
 
 #include <public/xen.h>
 
+/*
+ * Base address of the guest's supervisor-mode APLIC. The value is the address
+ * typically used for APLIC by QEMU.
+ */
+#define GUEST_APLIC_S_BASE _UL(0xd000000)
+
 /*
  * Base address of the guest's supervisor-mode IMSIC. The value is the address
  * typically used for IMSIC by QEMU.
diff --git a/xen/arch/riscv/vaplic.c b/xen/arch/riscv/vaplic.c
index c9f188b989..a529a5b1dc 100644
--- a/xen/arch/riscv/vaplic.c
+++ b/xen/arch/riscv/vaplic.c
@@ -9,6 +9,8 @@
  */
 
 #include <xen/errno.h>
+#include <xen/fdt-kernel.h>
+#include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 #include <xen/xvmalloc.h>
 
@@ -19,6 +21,80 @@
 
 #include "aplic-priv.h"
 
+unsigned int __ro_after_init guest_aplic_num_sources;
+
+#define VAPLIC_COMPATIBLE "riscv,aplic"
+
+#define FDT_VAPLIC_INT_CELLS 2
+
+static int __init cf_check vaplic_make_domu_dt_node(struct kernel_info *kinfo)
+{
+    struct domain *d = kinfo->bd.d;
+    int res;
+    void *fdt = kinfo->fdt;
+    unsigned int msi_parent_phandle;
+    char vaplic_name[32];
+    unsigned int aplic_size = APLIC_SIZE(d->max_vcpus);
+    const __be32 reg[] = {
+        cpu_to_be32(GUEST_APLIC_S_BASE >> 32),
+        cpu_to_be32(GUEST_APLIC_S_BASE),
+        cpu_to_be32(0),
+        cpu_to_be32(aplic_size),
+    };
+
+    BUILD_BUG_ON(APLIC_SIZE(MAX_VIRT_CPUS) > UINT_MAX);
+
+    res = snprintf(vaplic_name, ARRAY_SIZE(vaplic_name), "/soc/aplic@%lx",
+                   GUEST_APLIC_S_BASE);
+    if ( res >= sizeof(vaplic_name) )
+    {
+        dprintk(XENLOG_DEBUG, "vaplic name is truncated\n");
+        return -ENOBUFS;
+    }
+
+    res = vimsic_make_domu_dt_node(kinfo, &msi_parent_phandle);
+    if ( res )
+        return res;
+
+    res = fdt_begin_node(fdt, vaplic_name);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "#interrupt-cells", FDT_VAPLIC_INT_CELLS);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "reg", reg, sizeof(reg));
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "riscv,num-sources", guest_aplic_num_sources);
+    if ( res )
+        return res;
+
+    res = fdt_property(fdt, "interrupt-controller", NULL, 0);
+    if ( res )
+        return res;
+
+    res = fdt_property_string(fdt, "compatible", VAPLIC_COMPATIBLE);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "msi-parent", msi_parent_phandle);
+    if ( res )
+        return res;
+
+    res = fdt_property_cell(fdt, "phandle", kinfo->phandle_intc);
+    if ( res )
+        return res;
+
+    return fdt_end_node(fdt);
+}
+
+static const struct vintc_init_ops __initconstrel init_ops = {
+    .make_domu_dt_node = vaplic_make_domu_dt_node,
+};
+
 static const struct vintc_ops vintc_ops = {
     .vcpu_init = vcpu_imsic_init,
     .vcpu_deinit = vcpu_imsic_deinit,
@@ -33,6 +109,7 @@ int domain_vaplic_init(struct domain *d)
 
     d->arch.vintc = &vaplic->vintc;
     d->arch.vintc->ops = &vintc_ops;
+    d->arch.vintc->init_ops = &init_ops;
 
     vaplic->regs.domaincfg = APLIC_DOMAINCFG_RO;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:25:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:25:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427530.1650305 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e13-0004GB-Uz; Mon, 21 Sep 2026 13:25:05 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427530.1650305; Mon, 21 Sep 2026 13:25:05 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e13-0004G2-Rr; Mon, 21 Sep 2026 13:25:05 +0000
Received: by outflank-mailman (input) for mailman id 1427530;
 Mon, 21 Sep 2026 13:25:04 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e12-0004Fb-Ff
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:25:04 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e12-008xZD-0P
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e12-0094UE-1N
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VbZCbOD+Eu+GoDbRMCzy/zF21C/EUtHCZGrekssUWeg=; b=s05xuxeR6rBTxgrLADDkgwZub7
	rxw96fC3zSO5S3OAqdWqPzjopUh0Xb2653TIq9TSqcJiUwu+KtImWsX+SF+i6zljeljefBL+8HnaK
	FkfxckOOzhaQR6aagIDcvNHUrgvidDlGjMigB6LkvKI1KO0mxsgq7tvBNgrONTiA/fUc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Eclair: re-enable scanning of the (almost) final linking step
Message-Id: <E1x8e12-0094UE-1N@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:25:04 +0000

commit a401b5c9dc35988f57c3c414deeb7ac3f0a02ffa
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Sep 21 10:09:45 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:09:45 2026 +0200

    Eclair: re-enable scanning of the (almost) final linking step
    
    The real final binaries are now no longer created by a linker invocation,
    but by renaming an intermediate file (each). Arrange for linking pass 2
    outputs to be scanned instead, yet continue to exclude the auxiliary
    .xen.efi.alt.* binaries.
    
    Fixes: da944a72fdf4 ("x86: split xen-syms/xen.efi linking rules"))
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/analysis.ecl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/analysis.ecl b/automation/eclair_analysis/ECLAIR/analysis.ecl
index 675602e15a..c6e1a7a95d 100644
--- a/automation/eclair_analysis/ECLAIR/analysis.ecl
+++ b/automation/eclair_analysis/ECLAIR/analysis.ecl
@@ -36,8 +36,8 @@ their Standard Library equivalents."
 
 -doc_begin="Do not analyze intermediate linking artifacts, as they do not differ from their final
 counterparts for the purposes of MISRA C static analysis."
--file_tag+={xen_efi_tmp, "^xen/\\.xen\\.efi\\..*$"}
--file_tag+={xen_syms_tmp, "^xen/\\.xen-syms\\..*$"}
+-file_tag+={xen_efi_tmp, "^xen/\\.xen\\.efi\\.([01]|alt\\..*)$"}
+-file_tag+={xen_syms_tmp, "^xen/\\.xen-syms\\.[013]$"}
 -frames+={hide, "kind(program)&&target(xen_syms_tmp||xen_efi_tmp)"}
 -doc_end
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:25:16 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:25:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427533.1650308 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1E-0004MV-00; Mon, 21 Sep 2026 13:25:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427533.1650308; Mon, 21 Sep 2026 13:25:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1D-0004MN-TC; Mon, 21 Sep 2026 13:25:15 +0000
Received: by outflank-mailman (input) for mailman id 1427533;
 Mon, 21 Sep 2026 13:25:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e1C-0004MD-IE
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:25:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1C-008xZL-0g
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1C-0095hk-1d
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=DCKxiBeHRqOPlmGprd94IEKumjvDR5dHFSp78QX5E1c=; b=aYfobrO3suRa+TedjI9OsZz4kr
	0p3EusARPjrWe64MN5ipyPvO5HJvUvGoB97hfqeU9Ew0wDmGDFgnV4QbcKQZjF1IzCJdAthyW22VC
	eLi+Qp/H92JqUevH8PV8I4X9WYeKu4Fbr9BaO4bxVq5Kj/u7FBrgRckOBpYpGABBf3Ro=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/viridian: Workaround Hyper-V GP fault writing to MSR
Message-Id: <E1x8e1C-0095hk-1d@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:25:14 +0000

commit 33829ead9aedfb21b4103c7ebf1fcc497227a77a
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Mon Sep 21 10:10:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:10:22 2026 +0200

    x86/viridian: Workaround Hyper-V GP fault writing to MSR
    
    The Viridian spec requires the vector to be >= 0x10 when writing to the
    SINTx MSR, otherwise it should #GP fault.
    The spec-defined initial value is 0x10000, i.e. the vector is 0. On
    startup, for some reason Windows 11 Hyper-V tries to set the MSR to
    the spec-defined initial value and since the vector is 0, it GP faults.
    Fix this by doing as Hyper-V does and only fault if the SINT is
    unmasked.
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/viridian/synic.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c
index e6cba7548f..3125ccca0d 100644
--- a/xen/arch/x86/hvm/viridian/synic.c
+++ b/xen/arch/x86/hvm/viridian/synic.c
@@ -157,9 +157,14 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_synic) )
             return X86EMUL_EXCEPTION;
 
-        /* Vectors must be in the range 0x10-0xff inclusive */
+        /*
+         * Vectors must be in the range 0x10-0xff inclusive unless the vector
+         * is masked since Windows 11 Hyper-V (26H1) has been seen to write
+         * this MSR to its default value, despite not being a spec compliant
+         * value.
+         */
         new.as_uint64 = val;
-        if ( new.vector < 0x10 )
+        if ( new.vector < 0x10 && !new.masked )
             return X86EMUL_EXCEPTION;
 
         /*
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:25:26 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:25:26 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427534.1650312 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1O-0004PM-2b; Mon, 21 Sep 2026 13:25:26 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427534.1650312; Mon, 21 Sep 2026 13:25:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1O-0004PE-03; Mon, 21 Sep 2026 13:25:26 +0000
Received: by outflank-mailman (input) for mailman id 1427534;
 Mon, 21 Sep 2026 13:25:24 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e1M-0004P2-LH
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:25:24 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1M-008xZR-0z
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1M-0096eC-1w
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Bfejvwo8t72/Yf0Hw1ZFGv7YUdPLz8yIN3g+Guk7Jm0=; b=p4Cdcl8+o5px4fXqKoDvlA3dP6
	E1EHeSBytPzxFlVBunOVNLCmfGs3DAVAon2FKxoQtGGSDTV0JYfI+2Q2Uuzl39Vm8yjbbeAMzqujG
	hmoMVXQOIviyKe4ffP5w+reRaEHZCXQDK8c1HKJX5FahB9I66LqbPqtKMz8nDyq+AfzM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/viridian: Implement synthetic timer direct mode
Message-Id: <E1x8e1M-0096eC-1w@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:25:24 +0000

commit d60f9e94af9464798cb601f4005c9f72bae7b712
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Mon Sep 21 10:11:04 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:11:04 2026 +0200

    x86/viridian: Implement synthetic timer direct mode
    
    In direct mode, the timer asserts an interrupt on expiration rather than
    using a SynIC message. It is useful to implement this since Windows 11's
    Hyper-V can only use synthetic timers in direct mode.
    
    To avoid changing behaviour in existing guests, add a new Viridian flag,
    stimer_direct, to control whether this feature is visible and usable.
    
    At the same time, check that the reserved bits are zero and the APIC
    vector is only set when using direct mode since this is enforced by
    Hyper-V (although not mentioned in the spec).
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/viridian/time.c     | 44 +++++++++++++++++++++++++++++++-----
 xen/arch/x86/hvm/viridian/viridian.c |  3 +++
 xen/include/public/hvm/params.h      |  7 +++++-
 3 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/time.c b/xen/arch/x86/hvm/viridian/time.c
index 082528dc94..65654cf969 100644
--- a/xen/arch/x86/hvm/viridian/time.c
+++ b/xen/arch/x86/hvm/viridian/time.c
@@ -223,6 +223,21 @@ static void start_stimer(struct viridian_stimer *vs)
     set_timer(&vs->timer, timeout + NOW());
 }
 
+static bool stimer_direct_mode(const struct vcpu *v,
+                               const union hv_stimer_config *config)
+{
+    return (viridian_feature_mask(v->domain) & HVMPV_stimer_direct) &&
+           config->direct_mode;
+}
+
+static void stimer_deliver_direct(struct vcpu *v, const struct viridian_stimer *vs)
+{
+    struct vlapic *vlapic = vcpu_vlapic(v);
+
+    if ( vlapic_enabled(vlapic) )
+        vlapic_set_irq(vlapic, vs->config.apic_vector, 0);
+}
+
 static void poll_stimer(struct vcpu *v, unsigned int stimerx)
 {
     struct viridian_vcpu *vv = v->arch.hvm.viridian;
@@ -242,9 +257,11 @@ static void poll_stimer(struct vcpu *v, unsigned int stimerx)
     if ( !test_bit(stimerx, &vv->stimer_pending) )
         return;
 
-    if ( !viridian_synic_deliver_timer_msg(v, vs->config.sintx,
-                                           stimerx, vs->expiration,
-                                           time_ref_count(v->domain)) )
+    if ( stimer_direct_mode(v, &vs->config) )
+        stimer_deliver_direct(v, vs);
+    else if ( !viridian_synic_deliver_timer_msg(v, vs->config.sintx,
+                                                stimerx, vs->expiration,
+                                                time_ref_count(v->domain)) )
         return;
 
     clear_bit(stimerx, &vv->stimer_pending);
@@ -361,6 +378,7 @@ int viridian_time_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
     case HV_X64_MSR_STIMER2_CONFIG:
     case HV_X64_MSR_STIMER3_CONFIG:
     {
+        union hv_stimer_config new;
         unsigned int stimerx = (idx - HV_X64_MSR_STIMER0_CONFIG) / 2;
         struct viridian_stimer *vs =
             &array_access_nospec(vv->stimer, stimerx);
@@ -368,11 +386,21 @@ int viridian_time_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val)
         if ( !(viridian_feature_mask(d) & HVMPV_stimer) )
             return X86EMUL_EXCEPTION;
 
+        new.as_uint64 = val;
+
+        if ( new.reserved_z0 || new.reserved_z1 )
+            return X86EMUL_EXCEPTION;
+
+        if ( stimer_direct_mode(v, &new) ?
+             new.apic_vector < 0x10 : new.apic_vector )
+            return X86EMUL_EXCEPTION;
+
         stop_stimer(vs);
 
         vs->config.as_uint64 = val;
 
-        if ( !vs->config.sintx || !vs->count )
+        if ( (!stimer_direct_mode(v, &vs->config) && !vs->config.sintx) ||
+             !vs->count )
             vs->config.enable = 0;
 
         if ( vs->config.enable )
@@ -583,8 +611,12 @@ void viridian_time_load_vcpu_ctxt(
 
         vs->config.as_uint64 = ctxt->stimer_config_msr[i];
         vs->count = ctxt->stimer_count_msr[i];
-        if ( !vs->config.sintx || !vs->count )
-            /* Reject enabling with a zero sintx or count fields. */
+        if ( (!stimer_direct_mode(v, &vs->config) && !vs->config.sintx) ||
+             !vs->count )
+            /*
+             * Reject enabling with a zero sintx (if not using direct mode) or
+             * zero count field.
+             */
             vs->config.enable = 0;
     }
 }
diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c
index 90e749ceb5..90be5842b9 100644
--- a/xen/arch/x86/hvm/viridian/viridian.c
+++ b/xen/arch/x86/hvm/viridian/viridian.c
@@ -78,6 +78,7 @@ typedef union _HV_CRASH_CTL_REG_CONTENTS
 #define CPUID3D_CPU_DYNAMIC_PARTITIONING (1 << 3)
 #define CPUID3D_CRASH_MSRS (1 << 10)
 #define CPUID3D_SINT_POLLING (1 << 17)
+#define CPUID3D_STIMER_DIRECT_MODE (1 << 19)
 
 /* Viridian CPUID leaf 4: Implementation Recommendations. */
 #define CPUID4A_HCALL_REMOTE_TLB_FLUSH (1 << 2)
@@ -185,6 +186,8 @@ void cpuid_viridian_leaves(const struct vcpu *v, uint32_t leaf,
             res->d |= CPUID3D_CRASH_MSRS;
         if ( viridian_feature_mask(d) & HVMPV_synic )
             res->d |= CPUID3D_SINT_POLLING;
+        if ( viridian_feature_mask(d) & HVMPV_stimer_direct )
+            res->d |= CPUID3D_STIMER_DIRECT_MODE;
 
         break;
     }
diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index 99c40b4287..4db5142970 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -159,6 +159,10 @@
 #define _HVMPV_cpu_hotplug 12
 #define HVMPV_cpu_hotplug (1 << _HVMPV_cpu_hotplug)
 
+/* Enable STIMER direct mode */
+#define _HVMPV_stimer_direct 13
+#define HVMPV_stimer_direct (1 << _HVMPV_stimer_direct)
+
 #define HVMPV_feature_mask \
         (HVMPV_base_freq | \
          HVMPV_no_freq | \
@@ -172,7 +176,8 @@
          HVMPV_hcall_ipi | \
          HVMPV_ex_processor_masks | \
          HVMPV_no_vp_limit | \
-         HVMPV_cpu_hotplug)
+         HVMPV_cpu_hotplug | \
+         HVMPV_stimer_direct)
 
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:25:36 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:25:36 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427535.1650316 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1Y-0004Rd-3y; Mon, 21 Sep 2026 13:25:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427535.1650316; Mon, 21 Sep 2026 13:25:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1Y-0004RU-1N; Mon, 21 Sep 2026 13:25:36 +0000
Received: by outflank-mailman (input) for mailman id 1427535;
 Mon, 21 Sep 2026 13:25:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e1W-0004RH-Ny
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:25:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1W-008xZb-1G
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1W-0097eH-2E
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=tkLahiwq8A/VsJ2TpsXfSj1XjqPFEABZh8hycTtWkaU=; b=LCDlsXzCCG9YC/o1/DKwkTFBQZ
	55p7/XKL1ycyjIP/CG/1g4FL9hqkjrNWgcgS4sJdMTMfvP+gWwHh9fb2NEl7D7wpFGiKCGaSfO3cF
	+seRhaervaZcUt0R6cVDQZ07f4ubZtSjQeMdjf5poFNk8lQUBsMKmYFITZdC1VyQSJJw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/svm: Intercept CR0 writes selectively
Message-Id: <E1x8e1W-0097eH-2E@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:25:34 +0000

commit 1b2f3cbc09885d7b31298f11daddaadbe59ed71d
Author:     Ross Lagerwall <ross.lagerwall@citrix.com>
AuthorDate: Mon Sep 21 10:11:27 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:11:27 2026 +0200

    x86/svm: Intercept CR0 writes selectively
    
    Since 3356d685dbda ("x86/svm: Remove lazy FPU support"), Xen does not
    need to track when the TS or MP bits change so opt to intercept CR0
    writes selectively. Aside from potentially reducing a few VMEXITs, this
    fixes a nested virt bug where L1 intercepts CR0_SEL_WRITE and L0
    intercepts CR0_WRITE. The hardware prioritizes CR0_WRITE and so L1 never
    sees any CR0 writes.
    
    Since CR0 TS/MP bits may now change behind Xen's back, sync CR0 on
    VMEXIT so that the emulator sees the correct values.
    
    Shadow mode continues to use the full CR0_WRITE intercept since with
    Shadow the CR0 in the VMCB is not the same as the value Xen tracks on
    behalf of the guest and allowing the guest to change one of them
    directly would be fragile.
    
    Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/svm/svm.c  | 7 ++++++-
 xen/arch/x86/hvm/svm/vmcb.c | 7 +++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index b5fc459e62..e6a0edcf71 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1640,7 +1640,8 @@ static void svm_vmexit_do_cr_access(
 {
     int gp, cr, dir, rc;
 
-    cr = vmcb->exitcode - VMEXIT_CR0_READ;
+    cr = (vmcb->exitcode == VMEXIT_CR0_SEL_WRITE)
+         ? 16 : (vmcb->exitcode - VMEXIT_CR0_READ);
     dir = (cr > 15);
     cr &= 0xf;
     gp = vmcb->ei.mov_cr.gpr;
@@ -2519,7 +2520,10 @@ void asmlinkage svm_vmexit_handler(void)
 
     v->arch.hvm.guest_cr[2] = vmcb_get_cr2(vmcb);
     if ( paging_mode_hap(v->domain) )
+    {
+        v->arch.hvm.guest_cr[0] = vmcb_get_cr0(vmcb);
         v->arch.hvm.guest_cr[3] = v->arch.hvm.hw_cr[3] = vmcb_get_cr3(vmcb);
+    }
 
     if ( nestedhvm_enabled(v->domain) && nestedhvm_vcpu_in_guestmode(v) )
         vcpu_guestmode = 1;
@@ -2883,6 +2887,7 @@ void asmlinkage svm_vmexit_handler(void)
 
     case VMEXIT_CR0_READ ... VMEXIT_CR15_READ:
     case VMEXIT_CR0_WRITE ... VMEXIT_CR15_WRITE:
+    case VMEXIT_CR0_SEL_WRITE:
         if ( cpu_has_svm_decode && vmcb->ei.mov_cr.mov_insn )
             svm_vmexit_do_cr_access(vmcb, regs);
         else if ( !hvm_emulate_one_insn(x86_insn_is_cr_access, "CR access") )
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 975a1eaef8..d069280a4d 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -154,6 +154,13 @@ static int construct_vmcb(struct vcpu *v)
         vmcb->_cr_intercepts &=
             ~(CR_INTERCEPT_CR3_READ|CR_INTERCEPT_CR3_WRITE);
 
+        /*
+         * Xen is not interested in changes to the MP and TS bits so use
+         * CR0_SEL_WRITE to avoid unnecessary intercepts.
+         */
+        vmcb->_cr_intercepts &= ~CR_INTERCEPT_CR0_WRITE;
+        vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_CR0_SEL_WRITE;
+
         /*
          * No point in intercepting INVLPG if we don't have shadow pagetables
          * that need to be fixed up.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:25:46 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:25:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427536.1650320 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1i-0004UK-5F; Mon, 21 Sep 2026 13:25:46 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427536.1650320; Mon, 21 Sep 2026 13:25:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1i-0004UC-2e; Mon, 21 Sep 2026 13:25:46 +0000
Received: by outflank-mailman (input) for mailman id 1427536;
 Mon, 21 Sep 2026 13:25:44 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e1g-0004U3-Qd
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:25:44 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1g-008xa3-1X
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1g-0098gm-2V
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=anYWay7HHQRlRbzuhrH6Ozl18xA7RV2CAsU9AaVx1Y0=; b=j6bNtxW34oCSCXJutUwiZ0TjKP
	P+sMz7SNxtwkj3UetmilP+zMqSfYTtGCHUnazj0u/8siN9zzojVTmqPTeGKh26VUw+xOUqFoFgElh
	kAwGt5Z65D3zbgnHKmRPGMnwou4Y9kd5Z6HtWhrflpSO0iHkBakYhH89INw2tEYYOGBE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/sched: rtds: add global-EDF utilization admission control
Message-Id: <E1x8e1g-0098gm-2V@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:25:44 +0000

commit 5772eaafe34b9b92f27aced1b671454fcf371c5e
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:12:39 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: add global-EDF utilization admission control
    
    RTDS has no admission control: nothing stops the sum of all admitted
    units' (budget/period) reservations in a cpupool from exceeding
    what its pCPUs can actually provide. Once that happens, none of the
    EDF deadline guarantees this scheduler is built around still hold
    for the units sharing that pool.
    
    Introduce admission control to prevent this: reject a reservation
    whenever admitting it would push a cpupool's units over its capacity.
    Track a running utilization total per cpupool, and enforce it in
    rt_alloc_udata()/rt_free_udata(), the paired lifecycle hooks for a
    unit's creation and destruction. This catches the default
    period/budget every new unit gets.
    
    Utilization is represented as a fixed-point value: budget is
    left shifted by RTDS_UTIL_SHIFT (20 bits) and divided by period.
    A plain "(budget << RTDS_UTIL_SHIFT) / period" risks overflowing
    the multiply for large enough budgets. Rather than widen the
    arithmetic to tolerate any input, the input itself is bounded:
    rt_validate_params() rejects any budget above RTDS_MAX_BUDGET,
    chosen as the largest value that can be left-shifted by
    RTDS_UTIL_SHIFT without overflowing 64 bits, so the shift in
    rt_unit_utilization() can never overflow.
    
    A cpupool's capacity rt_utilization_cap() scales with the number of
    scheduling resources in it. It is calculated as:
    (number of sched_resources * RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100),
    where RTDS_UTIL_CAP_PCT controls how much of that capacity can
    actually be reserved; at 100% (its current value), all of it can be.
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 104 insertions(+), 1 deletion(-)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 0e9f04ea72..ff561ec1c9 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -114,6 +114,24 @@
  */
 #define RTDS_MAX_PRIORITY_LEVEL (~0U)
 
+/*
+ * Fixed-point scale for utilization (budget/period)
+ */
+#define RTDS_UTIL_SHIFT     20
+#define RTDS_UTIL_SCALE     (1ULL << RTDS_UTIL_SHIFT)
+
+/*
+ * Largest budget safe to left-shift by RTDS_UTIL_SHIFT without
+ * overflowing 64 bits. Enforced in rt_validate_params().
+ */
+#define RTDS_MAX_BUDGET_BITS  (64 - RTDS_UTIL_SHIFT)
+#define RTDS_MAX_BUDGET       ((1ULL << RTDS_MAX_BUDGET_BITS) - 1)
+
+/*
+ * % of a cpupool's sched_resource capacity admitted units may sum up to.
+ */
+#define RTDS_UTIL_CAP_PCT   100
+
 /*
  * UPDATE_LIMIT_SHIFT: a constant used in rt_update_deadline(). When finding
  * the next deadline, performing addition could be faster if the difference
@@ -195,6 +213,9 @@ struct rt_private {
     struct list_head replq;     /* ordered list of units that need replenishment */
 
     cpumask_t tickled;          /* cpus been tickled */
+
+    /* Sum of admitted units' (budget/period), scaled by RTDS_UTIL_SCALE */
+    uint64_t utilization;
 };
 
 /*
@@ -635,6 +656,54 @@ replq_reinsert(const struct scheduler *ops, struct rt_unit *svc)
         set_timer(&rt_priv(ops)->repl_timer, rearm_svc->cur_deadline);
 }
 
+/*
+ * budget << RTDS_UTIL_SHIFT can't overflow: rt_validate_params()
+ * caps budget at RTDS_MAX_BUDGET. period == 0 means "no
+ * reservation" (a unit being removed), not an error.
+ */
+static uint64_t
+rt_unit_utilization(s_time_t period, s_time_t budget)
+{
+    if ( period <= 0 )
+        return 0;
+
+    return ((uint64_t)budget << RTDS_UTIL_SHIFT) / (uint64_t)period;
+}
+
+/*
+ * Utilization capacity of the cpupool domain d resides in.
+ */
+static uint64_t
+rt_utilization_cap(const struct domain *d)
+{
+    unsigned int cpus = cpumask_weight(cpupool_domain_master_cpumask(d));
+
+    return (uint64_t)cpus * RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
+}
+
+/*
+ * Replaces a unit's reservation and updates prv->utilization
+ * to match. Growth that would push utilization over the
+ * cpupool's cap is refused. Removing a unit or shrinking
+ * a unit's reservation always succeed.
+ */
+static bool
+rt_try_set_utilization(struct rt_private *prv, const struct domain *d,
+                       s_time_t old_period, s_time_t old_budget,
+                       s_time_t new_period, s_time_t new_budget)
+{
+    uint64_t old_util = rt_unit_utilization(old_period, old_budget);
+    uint64_t new_util = rt_unit_utilization(new_period, new_budget);
+    uint64_t total    = prv->utilization - old_util + new_util;
+
+    if ( new_util > old_util && total > rt_utilization_cap(d) )
+        return false;
+
+    prv->utilization = total;
+
+    return true;
+}
+
 /*
  * Pick a valid resource for the unit vc
  * Valid resource of an unit is intesection of unit's affinity
@@ -864,6 +933,7 @@ rt_free_domdata(const struct scheduler *ops, void *data)
 static void * cf_check
 rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
 {
+    struct rt_private *prv = rt_priv(ops);
     struct rt_unit *svc;
 
     /* Allocate per-UNIT info */
@@ -881,9 +951,30 @@ rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
     __set_bit(__RTDS_extratime, &svc->flags);
     svc->priority_level = 0;
     svc->period = RTDS_DEFAULT_PERIOD;
+
     if ( !is_idle_unit(unit) )
+    {
+        unsigned long flags;
+        bool admitted;
+
         svc->budget = RTDS_DEFAULT_BUDGET;
 
+        spin_lock_irqsave(&prv->lock, flags);
+        admitted = rt_try_set_utilization(prv, unit->domain, 0, 0,
+                                          svc->period, svc->budget);
+        spin_unlock_irqrestore(&prv->lock, flags);
+
+        if ( !admitted )
+        {
+            printk(XENLOG_WARNING
+                   "RTDS: ADMISSION CONTROL: refusing unit %u of d%d,"
+                   " would exceed utilization capacity of the cpupool\n",
+                   unit->unit_id, unit->domain->domain_id);
+            xfree(svc);
+            return NULL;
+        }
+    }
+
     SCHED_STAT_CRANK(unit_alloc);
 
     return svc;
@@ -892,8 +983,19 @@ rt_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, void *dd)
 static void cf_check
 rt_free_udata(const struct scheduler *ops, void *priv)
 {
+    struct rt_private *prv = rt_priv(ops);
     struct rt_unit *svc = priv;
 
+    if ( svc && !is_idle_unit(svc->unit) )
+    {
+        unsigned long flags;
+
+        spin_lock_irqsave(&prv->lock, flags);
+        rt_try_set_utilization(prv, svc->unit->domain,
+                               svc->period, svc->budget, 0, 0);
+        spin_unlock_irqrestore(&prv->lock, flags);
+    }
+
     xfree(svc);
 }
 
@@ -1389,7 +1491,8 @@ rt_validate_params(const struct xen_domctl_sched_rtds *rtds,
     s_time_t b = MICROSECS(rtds->budget);
 
     if ( p < RTDS_MIN_PERIOD || p > RTDS_MAX_PERIOD ||
-         b < RTDS_MIN_BUDGET || b > p )
+         b < RTDS_MIN_BUDGET || b > p ||
+         b > (s_time_t)RTDS_MAX_BUDGET )
         return -EINVAL;
 
     *period = p;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:25:56 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:25:56 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427537.1650324 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1s-0004We-6q; Mon, 21 Sep 2026 13:25:56 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427537.1650324; Mon, 21 Sep 2026 13:25:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e1s-0004WU-3y; Mon, 21 Sep 2026 13:25:56 +0000
Received: by outflank-mailman (input) for mailman id 1427537;
 Mon, 21 Sep 2026 13:25:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e1q-0004WL-TS
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:25:54 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1q-008xaH-1o
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e1q-0099w4-2l
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:25:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=GNyawK4J+sTpqnb/UC4fzyM03lFKzaLxPgKHFmBY7BM=; b=SDa6ECWgbZSi5o7me6QjDlqdNQ
	cV98GRygdms6sDXHHPVJnGAp0vvKkFgpVCt/2D2qA1abuJH83Qqf8mTMpgDI3btz8uCKrb/L1sEJP
	dAmI8udrv8KNsA5r8isewCuuipH3veJ/VDrM8vIjVI00ayLZMV0tyT8hyYHS0TrGkuvs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/sched: rtds: enforce admission control in xl sched-rtds
Message-Id: <E1x8e1q-0099w4-2l@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:25:54 +0000

commit 38e3acece28600313de92f1ff308cfa71675aa2e
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:12:58 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: enforce admission control in xl sched-rtds
    
    Now that we have introduced admission control for new and
    removed units. Extend it to XEN_DOMCTL_SCHEDOP_putinfo and
    putvcpuinfo, so growing an existing reservation via
    xl sched-rtds is checked too.
    
    putinfo sets the same (period, budget) for every unit of a
    domain at once, so it tests the whole domain's utilization
    delta atomically, rather than unit-by-unit, which could
    spuriously reject an overall-acceptable change depending on
    iteration order.
    
    putvcpuinfo changes one unit at a time, so it just calls
    rt_try_set_utilization() directly.
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index ff561ec1c9..9f7cd1aea7 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -1527,11 +1527,43 @@ rt_dom_cntl(
         op->u.rtds.budget = RTDS_DEFAULT_BUDGET / MICROSECS(1);
         break;
     case XEN_DOMCTL_SCHEDOP_putinfo:
+    {
+        uint64_t dom_old_util = 0, new_util, new_total;
+        unsigned int nr_units = 0;
+
         rc = rt_validate_params(&op->u.rtds, &period, &budget);
         if ( rc )
             break;
 
+        new_util = rt_unit_utilization(period, budget);
+
         spin_lock_irqsave(&prv->lock, flags);
+
+        /*
+         * Same (period, budget) for every unit of d: test and commit
+         * the domain's whole utilization delta atomically, rather
+         * than unit-by-unit, which could spuriously reject an
+         * overall-acceptable change depending on iteration order.
+         */
+        for_each_sched_unit ( d, unit )
+        {
+            svc = rt_unit(unit);
+            dom_old_util += rt_unit_utilization(svc->period, svc->budget);
+            nr_units++;
+        }
+
+        new_total = prv->utilization - dom_old_util +
+                    (uint64_t)nr_units * new_util;
+
+        if ( new_total > prv->utilization && new_total > rt_utilization_cap(d) )
+        {
+            spin_unlock_irqrestore(&prv->lock, flags);
+            rc = -ENOSPC;
+            break;
+        }
+
+        prv->utilization = new_total;
+
         for_each_sched_unit ( d, unit )
         {
             svc = rt_unit(unit);
@@ -1540,6 +1572,7 @@ rt_dom_cntl(
         }
         spin_unlock_irqrestore(&prv->lock, flags);
         break;
+    }
     case XEN_DOMCTL_SCHEDOP_getvcpuinfo:
     case XEN_DOMCTL_SCHEDOP_putvcpuinfo:
         while ( index < op->u.v.nr_vcpus )
@@ -1584,6 +1617,15 @@ rt_dom_cntl(
 
                 spin_lock_irqsave(&prv->lock, flags);
                 svc = rt_unit(d->vcpu[local_sched.vcpuid]->sched_unit);
+
+                if ( !rt_try_set_utilization(prv, d, svc->period, svc->budget,
+                                              period, budget) )
+                {
+                    spin_unlock_irqrestore(&prv->lock, flags);
+                    rc = -ENOSPC;
+                    break;
+                }
+
                 svc->period = period;
                 svc->budget = budget;
                 if ( local_sched.u.rtds.flags & XEN_DOMCTL_SCHEDRT_extra )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:26:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:26:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427538.1650328 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e22-0004Yg-8E; Mon, 21 Sep 2026 13:26:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427538.1650328; Mon, 21 Sep 2026 13:26:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e22-0004YY-5M; Mon, 21 Sep 2026 13:26:06 +0000
Received: by outflank-mailman (input) for mailman id 1427538;
 Mon, 21 Sep 2026 13:26:05 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e21-0004YO-0M
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:26:05 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e20-008xaq-27
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e20-009BMp-33
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=U768pq4t+WOpuWpV9RSo8t9kv+WeFP/6xA7DgfH7sTA=; b=E/SJArzGJVLBV5ccGx4DxvB4he
	gCe5JGqiPo3FMZAuvk6paVrvUwrqqXBf/O2WP08jx51PFADGis80Vcyb9UMq/CN/nZTib6SXRiLkq
	0d8A7wXfLo7Se9GN6Wo11wNuoZVzsx8YcDwE4Z3DF2puU3Wcfhqjya9EmOH69P2xVy10=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/sched: rtds: report utilization and cap via debug key
Message-Id: <E1x8e20-009BMp-33@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:26:04 +0000

commit 5f7bfb20cd726dab78fa6bca71aa8230d5cfd812
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:13:14 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: report utilization and cap via debug key
    
    Print a cpupool's admitted utilization against its capacity in the
    'r' debug ky (xl debug-keys r), so an operator can see the total
    usage of a cpupool.
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 9f7cd1aea7..2e4312a7dd 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -399,12 +399,22 @@ rt_dump(const struct scheduler *ops)
     const struct rt_unit *svc;
     const struct rt_dom *sdom;
     unsigned long flags;
+    uint64_t cap;
 
     spin_lock_irqsave(&prv->lock, flags);
 
     if ( list_empty(&prv->sdom) )
         goto out;
 
+    cap = (uint64_t)cpumask_weight(ops->cpupool->res_valid) *
+          RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
+
+    if ( cap )
+        printk("Utilization: %llu%% of capacity\n",
+               (unsigned long long)(prv->utilization * 100 / cap));
+    else
+        printk("Utilization: cpupool has no capacity\n");
+
     runq = rt_runq(ops);
     depletedq = rt_depletedq(ops);
     replq = rt_replq(ops);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:26:16 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:26:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427540.1650332 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e2C-0004bR-AY; Mon, 21 Sep 2026 13:26:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427540.1650332; Mon, 21 Sep 2026 13:26:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e2C-0004bJ-7v; Mon, 21 Sep 2026 13:26:16 +0000
Received: by outflank-mailman (input) for mailman id 1427540;
 Mon, 21 Sep 2026 13:26:15 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e2B-0004bA-36
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:26:15 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e2A-008xaw-2P
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:15 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e2B-009Cvi-09
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:15 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=m7PDHWsI6PaLnDTHpVoPmAc6yvVIzGnM0wRXroOoe88=; b=JOciUI75+fp4ovoRsEwLMOqQNr
	wtPMds8DARJJpkdO1sUG31c8EN3kY8t+3ZjAQe6nLp2Nb8Ek/mifRSFF4Q1a6t1nzT4E7AYGowG3B
	46SSRJ2LDcBko1jgRSlAMB8q/uisRRWlJgYe3NDTqQeu/RPm9JIy62geYd+6Qg1evQsE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/sched: rtds: make admission control cpupool-wide toggleable
Message-Id: <E1x8e2B-009Cvi-09@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:26:15 +0000

commit 04584da7920512451ef00e7168c12947d262f259
Author:     Furkan Caliskan <frn1furkan10@gmail.com>
AuthorDate: Mon Sep 21 10:13:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/sched: rtds: make admission control cpupool-wide toggleable
    
    Add a per-cpupool on/off switch for RTDS admission control via
    XEN_SYSCTL_scheduler_op, enabled by default, so an operator can
    disable/enable enforcement for a pool
    
    Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/rt.c       | 57 +++++++++++++++++++++++++++++++++++++++++----
 xen/include/public/sysctl.h |  5 ++++
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
index 2e4312a7dd..f3f1a7c2b6 100644
--- a/xen/common/sched/rt.c
+++ b/xen/common/sched/rt.c
@@ -216,6 +216,8 @@ struct rt_private {
 
     /* Sum of admitted units' (budget/period), scaled by RTDS_UTIL_SCALE */
     uint64_t utilization;
+
+    bool admission_control_enabled; /* on/off flag for admission control. */
 };
 
 /*
@@ -409,6 +411,9 @@ rt_dump(const struct scheduler *ops)
     cap = (uint64_t)cpumask_weight(ops->cpupool->res_valid) *
           RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
 
+    printk("Admission control: %s\n",
+            prv->admission_control_enabled ? "enabled" : "disabled");
+
     if ( cap )
         printk("Utilization: %llu%% of capacity\n",
                (unsigned long long)(prv->utilization * 100 / cap));
@@ -694,8 +699,8 @@ rt_utilization_cap(const struct domain *d)
 /*
  * Replaces a unit's reservation and updates prv->utilization
  * to match. Growth that would push utilization over the
- * cpupool's cap is refused. Removing a unit or shrinking
- * a unit's reservation always succeed.
+ * cpupool's cap is refused if admission control is enabled.
+ * Removing a unit or shrinking a unit's reservation always succeed.
  */
 static bool
 rt_try_set_utilization(struct rt_private *prv, const struct domain *d,
@@ -706,7 +711,8 @@ rt_try_set_utilization(struct rt_private *prv, const struct domain *d,
     uint64_t new_util = rt_unit_utilization(new_period, new_budget);
     uint64_t total    = prv->utilization - old_util + new_util;
 
-    if ( new_util > old_util && total > rt_utilization_cap(d) )
+    if ( prv->admission_control_enabled &&
+         new_util > old_util && total > rt_utilization_cap(d) )
         return false;
 
     prv->utilization = total;
@@ -773,6 +779,7 @@ rt_init(struct scheduler *ops)
     INIT_LIST_HEAD(&prv->runq);
     INIT_LIST_HEAD(&prv->depletedq);
     INIT_LIST_HEAD(&prv->replq);
+    prv->admission_control_enabled = true;
 
     ops->sched_data = prv;
     rc = 0;
@@ -1565,8 +1572,14 @@ rt_dom_cntl(
         new_total = prv->utilization - dom_old_util +
                     (uint64_t)nr_units * new_util;
 
-        if ( new_total > prv->utilization && new_total > rt_utilization_cap(d) )
+        if ( prv->admission_control_enabled &&
+             new_total > prv->utilization && new_total > rt_utilization_cap(d) )
         {
+            printk(XENLOG_WARNING
+                   "RTDS: ADMISSION CONTROL: refusing d%d,"
+                   " would exceed utilization capacity of the cpupool\n",
+                   d->domain_id);
+
             spin_unlock_irqrestore(&prv->lock, flags);
             rc = -ENOSPC;
             break;
@@ -1631,6 +1644,11 @@ rt_dom_cntl(
                 if ( !rt_try_set_utilization(prv, d, svc->period, svc->budget,
                                               period, budget) )
                 {
+                    printk(XENLOG_WARNING
+                           "RTDS: ADMISSION CONTROL: refusing vcpu %u of d%d,"
+                           " would exceed utilization capacity of the cpupool\n",
+                           local_sched.vcpuid, d->domain_id);
+
                     spin_unlock_irqrestore(&prv->lock, flags);
                     rc = -ENOSPC;
                     break;
@@ -1691,6 +1709,34 @@ rt_dom_cntl(
     return rc;
 }
 
+#ifdef CONFIG_SYSCTL
+static int cf_check
+rt_sys_cntl(const struct scheduler *ops,
+             struct xen_sysctl_scheduler_op *sc)
+{
+    struct xen_sysctl_rtds_schedule *params = &sc->u.sched_rtds;
+    struct rt_private *prv = rt_priv(ops);
+    unsigned long flags;
+
+    switch ( sc->cmd )
+    {
+    case XEN_SYSCTL_SCHEDOP_putinfo:
+        spin_lock_irqsave(&prv->lock, flags);
+        prv->admission_control_enabled = params->admission_control_enabled;
+        spin_unlock_irqrestore(&prv->lock, flags);
+        break;
+
+    case XEN_SYSCTL_SCHEDOP_getinfo:
+        spin_lock_irqsave(&prv->lock, flags);
+        params->admission_control_enabled = prv->admission_control_enabled;
+        spin_unlock_irqrestore(&prv->lock, flags);
+        break;
+    }
+
+    return 0;
+}
+#endif
+
 /*
  * The replenishment timer handler picks units
  * from the replq and does the actual replenishment.
@@ -1791,6 +1837,9 @@ static const struct sched_ops sched_rtds_def = {
     .remove_unit    = rt_unit_remove,
 
     .adjust         = rt_dom_cntl,
+#ifdef CONFIG_SYSCTL
+    .adjust_global  = rt_sys_cntl,
+#endif
 
     .pick_resource  = rt_res_pick,
     .do_schedule    = rt_schedule,
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index c7cd9b4eb0..63d0ee062b 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -814,6 +814,10 @@ struct xen_sysctl_credit2_schedule {
     uint32_t ratelimit_us;
 };
 
+struct xen_sysctl_rtds_schedule {
+    uint8_t admission_control_enabled;
+};
+
 /* XEN_SYSCTL_scheduler_op */
 /* Set or get info? */
 #define XEN_SYSCTL_SCHEDOP_putinfo 0
@@ -828,6 +832,7 @@ struct xen_sysctl_scheduler_op {
         } sched_arinc653;
         struct xen_sysctl_credit_schedule sched_credit;
         struct xen_sysctl_credit2_schedule sched_credit2;
+        struct xen_sysctl_rtds_schedule sched_rtds;
     } u;
 };
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:26:26 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:26:26 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427541.1650335 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e2M-0004db-Bs; Mon, 21 Sep 2026 13:26:26 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427541.1650335; Mon, 21 Sep 2026 13:26:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e2M-0004dT-9F; Mon, 21 Sep 2026 13:26:26 +0000
Received: by outflank-mailman (input) for mailman id 1427541;
 Mon, 21 Sep 2026 13:26:25 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e2L-0004dL-60
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:26:25 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e2K-008xb9-2g
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:25 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e2L-009Ejn-0P
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:25 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=C+Ctz10YSjpaU0DyVUAztsGySGdit+0qsbMnNemdOUg=; b=QS66xo13aMXtzixLFf23gL2AZK
	8+cZ2nhtsyiI5NsM6hMh0ADmgWIqnbgoSS4IGz044Ss08850mIh/2/3dOa4rK6Iv/7iJJBFxdbi7b
	Ly0D1invo4Zb8UCyRDaqenohGN2MCXcETcQxv/tZhv4T2lhRpDv5RJEZ0rsiQWbmTS8I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: add missing APLIC register offsets, masks to asm/aplic.h
Message-Id: <E1x8e2L-009Ejn-0P@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:26:25 +0000

commit 60004aa6da754b37064229494da2521ffd5e5d9d
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Mon Sep 21 10:13:56 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:43:00 2026 +0200

    xen/riscv: add missing APLIC register offsets, masks to asm/aplic.h
    
    These definitions are required for correct decoding of APLIC MMIO
    accesses and target configuration, and will be used by both the
    physical and virtual APLIC implementations.
    
    While adding them, rearrange the header in the style of x86's
    asm/msr-index.h: a register's offset is immediately followed by the
    definitions of that register's fields, with the blocks sorted by
    offset.  This makes the relation between a register and its fields
    obvious from the layout alone, so no comment is needed to express it.
    
    No functional change is intended by this patch; it only centralises
    hardware definitions that were previously missing.
    
    Co-developed-by: Romain Caritey <Romain.Caritey@microchip.com>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/riscv/include/asm/aplic.h | 90 +++++++++++++++++++++++++++++++-------
 1 file changed, 73 insertions(+), 17 deletions(-)

diff --git a/xen/arch/riscv/include/asm/aplic.h b/xen/arch/riscv/include/asm/aplic.h
index 07318aaac2..a2af55d54f 100644
--- a/xen/arch/riscv/include/asm/aplic.h
+++ b/xen/arch/riscv/include/asm/aplic.h
@@ -15,32 +15,88 @@
 
 #include <asm/imsic.h>
 
+/*
+ * APLIC register offsets and, immediately following each of them, the
+ * definitions of the fields of the respective register:
+ *
+ * #define APLIC_$NAME                      0x$OFFSET
+ * #define  APLIC_$NAME_$FIELD1             ...
+ * #define   APLIC_$NAME_$FIELD1_$VAL       ...
+ * #define  APLIC_$NAME_$FIELD2             ...
+ *
+ * Blocks of related constants are sorted by register offset.
+ */
+
+#define APLIC_CTRL_REGION_OFFSET_MASK       0x3fff
+
+#define APLIC_DOMAINCFG                     0x0000
 /*
  * domaincfg read-only fields (AIA spec):
  *  - bits [31:24] -> read-only 0x80
  *  - bit 7        -> read-only 0
  */
-#define APLIC_DOMAINCFG_RO      (0x80U << 24)
-#define APLIC_DOMAINCFG_IE      BIT(8, U)
-#define APLIC_DOMAINCFG_DM      BIT(2, U)
-#define APLIC_DOMAINCFG_BE      BIT(0, U)
+#define  APLIC_DOMAINCFG_RO             (0x80U << 24)
+#define  APLIC_DOMAINCFG_IE             BIT(8, U)
+#define  APLIC_DOMAINCFG_DM             BIT(2, U)
+#define  APLIC_DOMAINCFG_BE             BIT(0, U)
+
+#define APLIC_SOURCECFG_BASE            0x0004
+#define APLIC_SOURCECFG_LAST            0x0ffc
+/*
+ * sourcecfg[] register fields:
+ *  - bit 10 (D) selects the layout of the remaining bits;
+ *  - D = 1: bits [9:0] hold the Child Index, i.e. the source is delegated
+ *           to a child domain (unsupported by Xen);
+ *  - D = 0: bits [2:0] hold the source mode SM (WARL).
+ */
+#define  APLIC_SOURCECFG_D              BIT(10, U)
+#define  APLIC_SOURCECFG_SM             GENMASK(2, 0)
+#define   APLIC_SOURCECFG_SM_INACTIVE   0x0
+#define   APLIC_SOURCECFG_SM_DETACH     0x1
+/* Bits 0x2 and 0x3 are reserved */
+#define   APLIC_SOURCECFG_SM_EDGE_RISE  0x4
+#define   APLIC_SOURCECFG_SM_EDGE_FALL  0x5
+#define   APLIC_SOURCECFG_SM_LEVEL_HIGH 0x6
+#define   APLIC_SOURCECFG_SM_LEVEL_LOW  0x7
+
+#define APLIC_SMSICFGADDR               0x1bc8
+#define APLIC_SMSICFGADDRH              0x1bcc
+
+#define APLIC_SETIP_BASE                0x1c00
+#define APLIC_SETIP_LAST                0x1c7c
+#define APLIC_SETIPNUM                  0x1cdc
+
+#define APLIC_CLRIP_BASE                0x1d00
+#define APLIC_CLRIP_LAST                0x1d7c
+#define APLIC_CLRIPNUM                  0x1ddc
+
+#define APLIC_SETIE_BASE                0x1e00
+#define APLIC_SETIE_LAST                0x1e7c
+#define APLIC_SETIENUM                  0x1edc
+
+#define APLIC_CLRIE_BASE                0x1f00
+#define APLIC_CLRIE_LAST                0x1f7c
+#define APLIC_CLRIENUM                  0x1fdc
+
+#define APLIC_SETIPNUM_LE               0x2000
 
-#define APLIC_SOURCECFG_SM_INACTIVE     0x0
-#define APLIC_SOURCECFG_SM_DETACH       0x1
-#define APLIC_SOURCECFG_SM_EDGE_RISE    0x4
-#define APLIC_SOURCECFG_SM_EDGE_FALL    0x5
-#define APLIC_SOURCECFG_SM_LEVEL_HIGH   0x6
-#define APLIC_SOURCECFG_SM_LEVEL_LOW    0x7
+#define APLIC_GENMSI                    0x3000
 
-#define APLIC_TARGET_HART_IDX_SHIFT 18
+#define APLIC_TARGET_BASE               0x3004
+#define APLIC_TARGET_LAST               0x3ffc
+#define  APLIC_TARGET_HART_IDX          GENMASK(31, 18)
+#define  APLIC_TARGET_HART_IDX_SHIFT    18
+#define  APLIC_TARGET_GUEST_IDX         GENMASK(17, 12)
+/* Bit 11 is reserved and reads as zero */
+#define  APLIC_TARGET_EIID              GENMASK(10, 0)
 
-#define APLIC_IDC_SIZE          32
+#define APLIC_IDC_SIZE                  32
 
-#define APLIC_MIN_SIZE          0x4000
-#define APLIC_SIZE_ALIGN(x)     ROUNDUP(x, APLIC_MIN_SIZE)
+#define APLIC_MIN_SIZE                  0x4000
+#define APLIC_SIZE_ALIGN(x)             ROUNDUP(x, APLIC_MIN_SIZE)
 
-#define APLIC_SIZE(nr_cpus)     (APLIC_MIN_SIZE + \
-                                 APLIC_SIZE_ALIGN(APLIC_IDC_SIZE * (nr_cpus)))
+#define APLIC_SIZE(nr_cpus) \
+    (APLIC_MIN_SIZE + APLIC_SIZE_ALIGN(APLIC_IDC_SIZE * (nr_cpus)))
 
 struct aplic_regs {
     uint32_t domaincfg;         /* 0x0000 */
@@ -82,7 +138,7 @@ struct aplic_regs {
     uint8_t _reserved11[4088];  /* 0x2008 */
 
     uint32_t genmsi;            /* 0x3000 */
-    uint32_t target[1023];      /* 0x3008 */
+    uint32_t target[1023];      /* 0x3004 */
 };
 
 #endif /* ASM_RISCV_APLIC_H */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Sep 21 13:26:36 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 21 Sep 2026 13:26:36 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1427542.1650340 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e2W-0004ff-DE; Mon, 21 Sep 2026 13:26:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1427542.1650340; Mon, 21 Sep 2026 13:26:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8e2W-0004fX-AZ; Mon, 21 Sep 2026 13:26:36 +0000
Received: by outflank-mailman (input) for mailman id 1427542;
 Mon, 21 Sep 2026 13:26:35 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8e2V-0004fN-8b
 for xen-changelog@lists.xenproject.org; Mon, 21 Sep 2026 13:26:35 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e2U-008xbH-2x
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:35 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8e2V-009G7e-0g
 for xen-changelog@lists.xenproject.org;
 Mon, 21 Sep 2026 13:26:35 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=9rl6abxem9Y2PQ9Y3mnRwNIXvCwmlylvNDTvhch03nE=; b=04fGxJ1vSZTXlLD1tTVkIDN5dr
	wLa+zCmNukQqVRcW53LW787sg/OB2+8CZmp8tBYaeoa5iaR0UhEOOawgNXn92M9jbW7KPRcevJsZN
	seKq3X6avAbnQGtLVPyVBx0u2oOiI82u4fQKn/ZWMovABrPezln2Pl0qb6h+yIvCH8PU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] docs: clarify tag sequence in sending-patches
Message-Id: <E1x8e2V-009G7e-0g@xenbits.xenproject.org>
Date: Mon, 21 Sep 2026 13:26:35 +0000

commit fce27a1fd07fdd3ab270874846f51de45fc45d93
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Mon Sep 21 10:49:38 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Sep 21 10:49:38 2026 +0200

    docs: clarify tag sequence in sending-patches
    
    Make clear what an "Assisted-by:" tag relates to in
    sending-patches.pandoc.
    
    Add the possibility to clarify how AI was used.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Julien Grall <julien@xen.org>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 docs/process/sending-patches.pandoc | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/docs/process/sending-patches.pandoc b/docs/process/sending-patches.pandoc
index b924fa2b87..2506a686bb 100644
--- a/docs/process/sending-patches.pandoc
+++ b/docs/process/sending-patches.pandoc
@@ -213,9 +213,25 @@ Basic development tools (git, gcc, make, editors) should not be listed.
 Specialised but deterministic tools may optionally be listed, but their use
 should be clear from other context in the commit message.
 
+Note that an `Assisted-by:` tag relates to the next tag mentioning a
+natural person. So if you used AI to write a patch, the `Assisted-by:` tag
+should be just before your `Signed-off-by:` tag, while if AI was used to
+find an issue the patch is fixing, the `Assisted-by:` tag should be
+before the `Reported-by:` tag naming the reporter of the issue.
+
+The `Assisted-by:` tag can be followed by an optional comment mentioning
+in which part of the process AI was used, e.g.:
+
+    Assisted-by: Chat-GPT # commit message
+
+This allows even to list multiple different AI models used for different
+use cases, including the use of AI for finding an issue and the creating
+a patch for fixing it.
+
 Example:
 
-    Assisted-by: Claude:claude-3-opus
+    Assisted-by: sashiko-bot # finding the issue
+    Assisted-by: Claude:claude-3-opus # patch creation
 
 ### Signed-off-by:
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:22:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:22:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428389.1651113 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whP-00053n-Sd; Tue, 22 Sep 2026 09:22:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428389.1651113; Tue, 22 Sep 2026 09:22:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whP-00053e-Q4; Tue, 22 Sep 2026 09:22:03 +0000
Received: by outflank-mailman (input) for mailman id 1428389;
 Tue, 22 Sep 2026 09:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8whO-00053W-H2
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whO-00AlDb-0G
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whO-009XxC-19
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=S4K89GK3tsd2gcyPtPlf6OXaFH1BvGHppl2sfr/PHmg=; b=0fMKIUJUm0FRtaUrvD/Cg24vnp
	fp25TnYQIBoePm/61TeRXogplTCMv45KRamPFlWnPWEh3JrYREy0dGnCHsk9BlV7P3tnN25BF+dC4
	tvSQbhGeyLIqkh0lGeV8IJDo2C/Edma4f4Wyp/W9mc6xeKXFaiA5ucX7GaqDPtVNA59Y=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] lib: obey to Misra rule 11.8 where possible
Message-Id: <E1x8whO-009XxC-19@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:22:02 +0000

commit d4d8d3bfbad042f66e7342bf11923703cfbf7fec
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:12:33 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:12:33 2026 +0200

    lib: obey to Misra rule 11.8 where possible
    
    Casting away const-ness (or volatile-ness) is never a good idea, but
    some library functions (e.g. strchr()) require doing so. Where not
    required, remove / replace respective casts.
    
    While there convert touched functions to Xen style.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 xen/lib/memcpy.c  |  9 +++++----
 xen/lib/memmove.c | 30 +++++++++++++++++-------------
 xen/lib/strcmp.c  | 15 +++++++--------
 xen/lib/strncmp.c | 19 ++++++++++---------
 4 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/xen/lib/memcpy.c b/xen/lib/memcpy.c
index 5476121c0d..ff7e5487e3 100644
--- a/xen/lib/memcpy.c
+++ b/xen/lib/memcpy.c
@@ -15,12 +15,13 @@
  */
 void *(memcpy)(void *dest, const void *src, size_t n)
 {
-	char *tmp = (char *) dest, *s = (char *) src;
+    char *tmp = dest;
+    const char *s = src;
 
-	while (n--)
-		*tmp++ = *s++;
+    while ( n-- )
+        *tmp++ = *s++;
 
-	return dest;
+    return dest;
 }
 
 /*
diff --git a/xen/lib/memmove.c b/xen/lib/memmove.c
index 99804352e6..6d32f0d65c 100644
--- a/xen/lib/memmove.c
+++ b/xen/lib/memmove.c
@@ -14,21 +14,25 @@
  */
 void *(memmove)(void *dest, const void *src, size_t n)
 {
-	char *tmp, *s;
+    char *tmp;
+    const char *s;
 
-	if (dest <= src) {
-		tmp = (char *) dest;
-		s = (char *) src;
-		while (n--)
-			*tmp++ = *s++;
-	} else {
-		tmp = (char *) dest + n;
-		s = (char *) src + n;
-		while (n--)
-			*--tmp = *--s;
-	}
+    if ( dest <= src )
+    {
+        tmp = dest;
+        s = src;
+        while ( n-- )
+            *tmp++ = *s++;
+    }
+    else
+    {
+        tmp = dest + n;
+        s = src + n;
+        while ( n-- )
+            *--tmp = *--s;
+    }
 
-	return dest;
+    return dest;
 }
 
 /*
diff --git a/xen/lib/strcmp.c b/xen/lib/strcmp.c
index f85c1e8741..6b32693d57 100644
--- a/xen/lib/strcmp.c
+++ b/xen/lib/strcmp.c
@@ -11,16 +11,15 @@
  */
 int (strcmp)(const char *cs, const char *ct)
 {
-	unsigned char *csu = (unsigned char *)cs;
-	unsigned char *ctu = (unsigned char *)ct;
-	int res;
+    const unsigned char *csu = (const void *)cs;
+    const unsigned char *ctu = (const void *)ct;
+    int res;
 
-	while (1) {
-		if ((res = *csu - *ctu++) != 0 || !*csu++)
-			break;
-	}
+    for ( ; ; )
+        if ( (res = *csu - *ctu++) != 0 || !*csu++ )
+            break;
 
-	return res;
+    return res;
 }
 
 /*
diff --git a/xen/lib/strncmp.c b/xen/lib/strncmp.c
index 1480f58c2e..80a09d665b 100644
--- a/xen/lib/strncmp.c
+++ b/xen/lib/strncmp.c
@@ -12,17 +12,18 @@
  */
 int (strncmp)(const char *cs, const char *ct, size_t count)
 {
-	unsigned char *csu = (unsigned char *)cs;
-	unsigned char *ctu = (unsigned char *)ct;
-	int res = 0;
+    const unsigned char *csu = (const void *)cs;
+    const unsigned char *ctu = (const void *)ct;
+    int res = 0;
 
-	while (count) {
-		if ((res = *csu - *ctu++) != 0 || !*csu++)
-			break;
-		count--;
-	}
+    while ( count )
+    {
+        if ( (res = *csu - *ctu++) != 0 || !*csu++ )
+            break;
+        count--;
+    }
 
-	return res;
+    return res;
 }
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:22:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:22:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428390.1651117 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whZ-00055V-U7; Tue, 22 Sep 2026 09:22:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428390.1651117; Tue, 22 Sep 2026 09:22:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whZ-00055M-RO; Tue, 22 Sep 2026 09:22:13 +0000
Received: by outflank-mailman (input) for mailman id 1428390;
 Tue, 22 Sep 2026 09:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8whY-00055E-HF
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whY-00AlE8-0Y
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whY-009Yhq-1V
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+S7AQPrjcOt56c3oppHnjO5gn7FQ0b0R6PWgDYgo/0E=; b=RLeKq5G5nz+kD7dwKaeLCFodkp
	D+N0bS2Bm2vbqJfbkDiBq9ZIWCP01N8zCbbJeDaMId9m/11qEz0bhi1SFJUEC+bRLuoH+MT9BrOBS
	pH2PTMD/qjzWtlIZRAGhotjJI2rxvMhNeTMKwwgwes0pQNqmHEO+7kCG+Y26HczcEVvM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm/guestcopy: deviate copy_guest() uses just like their x86 counterparts
Message-Id: <E1x8whY-009Yhq-1V@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:22:12 +0000

commit 40ad6282e2b41700734ea4f480ca7f68c9f5c499
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:13:19 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:13:19 2026 +0200

    Arm/guestcopy: deviate copy_guest() uses just like their x86 counterparts
    
    Like x86/HVM's __hvm_copy(), Arm's copy_guest() is used for both to-guest
    and from-guest copying. Naturally in the latter case the hypervisor buffer
    needs writing to, hence the function parameter cannot be pointer-to-const.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 6 ++++++
 xen/arch/arm/guestcopy.c                         | 8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 670d3693d6..33d508a2fb 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -433,6 +433,12 @@ Fixing this violation would require to increase code complexity and lower readab
 -config=MC3A2.R11.8,reports+={safe,"any_area(any_loc(any_exp(macro(^container_of$))))"}
 -doc_end
 
+-doc_begin="Function copy_guest() in xen/arch/arm/guestcopy.c is a double-use
+function, where the parameter needs to not be const because it can be set for
+write or not"
+-config=MC3A2.R11.8,reports+={safe,"any_area(any_loc(text(^.*copy_guest.*COPY_to_guest doesn't modify.*$)))"}
+-doc_end
+
 -doc_begin="Function __hvm_copy in xen/arch/x86/hvm/hvm.c is a double-use
 function, where the parameter needs to not be const because it can be set for
 write or not"
diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index 86f1c9d0e3..2235d23ba5 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -109,14 +109,16 @@ static unsigned long copy_guest(void *buf, uint64_t addr, unsigned long len,
 
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int len)
 {
-    return copy_guest((void *)from, (vaddr_t)to, len,
-                      GVA_INFO(current), COPY_to_guest | COPY_linear);
+    return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
+                      (vaddr_t)to, len, GVA_INFO(current),
+                      COPY_to_guest | COPY_linear);
 }
 
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned int len)
 {
-    return copy_guest((void *)from, (vaddr_t)to, len, GVA_INFO(current),
+    return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
+                      (vaddr_t)to, len, GVA_INFO(current),
                       COPY_to_guest | COPY_flush_dcache | COPY_linear);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:22:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:22:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428391.1651121 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whk-000580-0J; Tue, 22 Sep 2026 09:22:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428391.1651121; Tue, 22 Sep 2026 09:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whj-00057r-Tz; Tue, 22 Sep 2026 09:22:23 +0000
Received: by outflank-mailman (input) for mailman id 1428391;
 Tue, 22 Sep 2026 09:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8whi-00057j-K6
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whi-00AlEg-0r
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whi-009ZR0-1m
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=xJL0J0ujAAf6eTIZmI9V4/JZDTrmtrBbri5+lvji53I=; b=v3k585oxcOqNR20tc+C1lAOtTD
	wLwyX9PhB1YTzBCwZLfpBIV7LVNmDtzCgff/rk89fo9QLJutJPfO249+hMUcnvPoOdvYjxdptK6Ri
	o4fxEtTVKiSAwkU2125UjGyZJpLOdm8IkjgErJ3z/azfyrMs30nT2KQN+OmYlJztN2Tw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] crypto/vmac: don't cast away const-ness in aes_key_setup()
Message-Id: <E1x8whi-009ZR0-1m@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:22:22 +0000

commit 25055cde9156268f32e61836f648aa0af128c05d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:13:47 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:13:47 2026 +0200

    crypto/vmac: don't cast away const-ness in aes_key_setup()
    
    vmac_set_key() passes in a pointer-to-const, which has const-ness removed
    despite rijndaelKeySetupEnc() properly taking pointer-to-const.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 xen/include/crypto/vmac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/crypto/vmac.h b/xen/include/crypto/vmac.h
index 735d2760a5..98e50b242f 100644
--- a/xen/include/crypto/vmac.h
+++ b/xen/include/crypto/vmac.h
@@ -69,7 +69,7 @@ typedef u32 aes_int_key[4*(VMAC_KEY_LEN/32+7)];
 	    				    (u8 *)(in), (u8 *)(out))
 #define aes_key_setup(user_key,int_key)                 \
 	    	rijndaelKeySetupEnc((u32 *)(int_key),       \
-	    	                    (u8 *)(user_key), \
+	    	                    (const u8 *)(user_key), \
 	    	                    VMAC_KEY_LEN)
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:22:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:22:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428392.1651126 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8whu-0005A2-23; Tue, 22 Sep 2026 09:22:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428392.1651126; Tue, 22 Sep 2026 09:22:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wht-00059s-VT; Tue, 22 Sep 2026 09:22:33 +0000
Received: by outflank-mailman (input) for mailman id 1428392;
 Tue, 22 Sep 2026 09:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8whs-00059j-N6
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whs-00AlFH-19
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8whs-009aAi-25
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=pV//xOtiqdTjTtjOok1az5MPcDW1cyOcD8aRH0XZRMY=; b=4+QxhUb5z6cpgYTPFw+6pA8zpf
	VmwTv+P0bqC0RwEU3O1GPxgH+ctdTszEj8KmzzDvkm1NLxJSkZMT3fP1zzI6CKx7u4tDCMbDoSd/U
	QMrYOl86hnK5vGWCTwdIhGZuV9DLXcqu23x1FtHj5Rm34vn7kt9sii6Lff3pxO8rduzA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pagewalk: avoid ACCESS_ONCE() in compound literals
Message-Id: <E1x8whs-009aAi-25@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:22:32 +0000

commit 578ac3ee3ec278c57aaae70eeeb8b6410228ab7d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:15:05 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:15:05 2026 +0200

    x86/pagewalk: avoid ACCESS_ONCE() in compound literals
    
    Compound literals are also covered by Misra C:2012 rule 13.1
    ("Initializer lists shall not contain persistent side effects"), and
    (sadly?) that rule also applies to lists with just a single element, or
    more generally with just a single side effect. Use intermediate variables
    to overcome this as well as ACCESS_ONCE()'s restriction to be usable on
    scalar types only.
    
    No functional change intended.
    
    Fixes: 0345b835dc97 ("x86/pagewalk: Read guest PTEs with ACCESS_ONCE()")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/guest_walk.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c
index df2ccaa674..9583d79102 100644
--- a/xen/arch/x86/mm/guest_walk.c
+++ b/xen/arch/x86/mm/guest_walk.c
@@ -129,7 +129,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l4_table_offset(va) * sizeof(gw->l4e);
     if ( !hvmemul_read_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e)) )
     {
-        gw->l4e = (guest_l4e_t){ ACCESS_ONCE(l4p[guest_l4_table_offset(va)].l4) };
+        guest_intpte_t l4e = ACCESS_ONCE(l4p[guest_l4_table_offset(va)].l4);
+
+        gw->l4e = (guest_l4e_t){ l4e };
         hvmemul_write_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e));
     }
     gflags = guest_l4e_get_flags(gw->l4e);
@@ -164,7 +166,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l3_table_offset(va) * sizeof(gw->l3e);
     if ( !hvmemul_read_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e)) )
     {
-        gw->l3e = (guest_l3e_t){ ACCESS_ONCE(l3p[guest_l3_table_offset(va)].l3) };
+        guest_intpte_t l3e = ACCESS_ONCE(l3p[guest_l3_table_offset(va)].l3);
+
+        gw->l3e = (guest_l3e_t){ l3e };
         hvmemul_write_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e));
     }
     gflags = guest_l3e_get_flags(gw->l3e);
@@ -264,7 +268,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
     l2gpa += guest_l2_table_offset(va) * sizeof(gw->l2e);
     if ( !hvmemul_read_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e)) )
     {
-        gw->l2e = (guest_l2e_t){ ACCESS_ONCE(l2p[guest_l2_table_offset(va)].l2) };
+        guest_intpte_t l2e = ACCESS_ONCE(l2p[guest_l2_table_offset(va)].l2);
+
+        gw->l2e = (guest_l2e_t){ l2e };
         hvmemul_write_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e));
     }
 
@@ -353,7 +359,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l1_table_offset(va) * sizeof(gw->l1e);
     if ( !hvmemul_read_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e)) )
     {
-        gw->l1e = (guest_l1e_t){ ACCESS_ONCE(l1p[guest_l1_table_offset(va)].l1) };
+        guest_intpte_t l1e = ACCESS_ONCE(l1p[guest_l1_table_offset(va)].l1);
+
+        gw->l1e = (guest_l1e_t){ l1e };
         hvmemul_write_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e));
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:22:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:22:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428393.1651129 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wi4-0005C6-35; Tue, 22 Sep 2026 09:22:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428393.1651129; Tue, 22 Sep 2026 09:22:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wi4-0005By-0W; Tue, 22 Sep 2026 09:22:44 +0000
Received: by outflank-mailman (input) for mailman id 1428393;
 Tue, 22 Sep 2026 09:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wi2-0005Bs-Pr
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wi2-00AlFm-1R
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wi2-009atq-2N
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=NhxIHLSeu7d2YbHr/hClQqDOLlTlnDd90RYdJZS9k44=; b=mWgT8IQw9HCxwPRqmMRg1sPGMy
	QBBuMVSjPVsqkLHhq4GOBy6EXAzM0+JOFQNEvzguBsV5y/YAHEu+oqasmGczlM6dVasCioBEuhD/u
	saSBSBImgbgTcOSBU3EyD8zKZquBDM85xzICRRm3C1Plx6YO5dp1gXO9+JC7AIiJYt3M=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm/guestcopy: avoid use of "current" in compound literals
Message-Id: <E1x8wi2-009atq-2N@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:22:42 +0000

commit 7963131d640f142c16dd6f835cfe3b8a2f347792
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:15:48 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:15:48 2026 +0200

    Arm/guestcopy: avoid use of "current" in compound literals
    
    Compound literals are also covered by Misra C:2012 rule 13.1
    ("Initializer lists shall not contain persistent side effects"), and
    (sadly?) that rule also applies to lists with just a single element, or
    more generally with just a single side effect. Use intermediate variables
    to overcome this.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/guestcopy.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index 2235d23ba5..cec33049b3 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -109,29 +109,37 @@ static unsigned long copy_guest(void *buf, uint64_t addr, unsigned long len,
 
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int len)
 {
+    struct vcpu *curr = current;
+
     return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
-                      (vaddr_t)to, len, GVA_INFO(current),
+                      (vaddr_t)to, len, GVA_INFO(curr),
                       COPY_to_guest | COPY_linear);
 }
 
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned int len)
 {
+    struct vcpu *curr = current;
+
     return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
-                      (vaddr_t)to, len, GVA_INFO(current),
+                      (vaddr_t)to, len, GVA_INFO(curr),
                       COPY_to_guest | COPY_flush_dcache | COPY_linear);
 }
 
 unsigned long raw_clear_guest(void *to, unsigned int len)
 {
-    return copy_guest(NULL, (vaddr_t)to, len, GVA_INFO(current),
+    struct vcpu *curr = current;
+
+    return copy_guest(NULL, (vaddr_t)to, len, GVA_INFO(curr),
                       COPY_to_guest | COPY_linear);
 }
 
 unsigned long raw_copy_from_guest(void *to, const void __user *from,
                                   unsigned int len)
 {
-    return copy_guest(to, (vaddr_t)from, len, GVA_INFO(current),
+    struct vcpu *curr = current;
+
+    return copy_guest(to, (vaddr_t)from, len, GVA_INFO(curr),
                       COPY_from_guest | COPY_linear);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:22:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:22:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428394.1651133 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wiE-0005EP-4t; Tue, 22 Sep 2026 09:22:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428394.1651133; Tue, 22 Sep 2026 09:22:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wiE-0005EH-1q; Tue, 22 Sep 2026 09:22:54 +0000
Received: by outflank-mailman (input) for mailman id 1428394;
 Tue, 22 Sep 2026 09:22:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wiC-0005E9-Sm
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:22:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiC-00AlIb-1j
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiC-009bdj-2g
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:22:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=AGTK6V1YV2kFfPzuzkBMdcL9AsGTHmz8akvJlM6uAe8=; b=sEyf1ilYGYU1pEOQpnIFQ/wjoM
	zaJ8qQlkc043K+9vd2Z/uv5hBL1eVsD7QxtCu3Q1PgI9ffHzGnE/9hLYJOdfEDk4vSTLU8WZ0NDQF
	FQFUXeJ4JXb4kPbSWONIJd7fjHJ/FTMKHESVOac6b93jtuuM2Gdw1CIZDcNEuazXKng0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] automation/Eclair: tag rule 13.1 as clean
Message-Id: <E1x8wiC-009bdj-2g@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:22:52 +0000

commit 5b063007d56faba6931f8344a9541453959ecad0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:17:04 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:17:04 2026 +0200

    automation/Eclair: tag rule 13.1 as clean
    
    Remaining violations were addressed.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/tagging.ecl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/eclair_analysis/ECLAIR/tagging.ecl
index c79358bdae..eeccb57426 100644
--- a/automation/eclair_analysis/ECLAIR/tagging.ecl
+++ b/automation/eclair_analysis/ECLAIR/tagging.ecl
@@ -66,6 +66,7 @@ MC3A2.R11.7||
 MC3A2.R11.9||
 MC3A2.R12.2||
 MC3A2.R12.5||
+MC3A2.R13.1||
 MC3A2.R13.2||
 MC3A2.R13.6||
 MC3A2.R14.1||
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:23:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:23:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428395.1651139 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wiO-0005GL-6x; Tue, 22 Sep 2026 09:23:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428395.1651139; Tue, 22 Sep 2026 09:23:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wiO-0005GD-3F; Tue, 22 Sep 2026 09:23:04 +0000
Received: by outflank-mailman (input) for mailman id 1428395;
 Tue, 22 Sep 2026 09:23:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wiM-0005G7-W3
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:23:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiM-00AlJb-24
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiM-009cS8-2y
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=jiVC2E/DcMXVBmrcRn9DeI+VoPiOYOoj6ejFZgDvWNc=; b=yET6FS7msp6k7qE3we054JgZhO
	F7mUUpVFwrc0aHgHjnrku0wvbB7hBrP93Vz1/8yhZYspbzPu3dcqSk1nWFPqi9BoZJAt0UhGGzjoa
	6PJcZ8Th37Ehs7cTfUhjsO3RpyBIDZ3N+Bcw37RIDQKQmTn/+XYNUacz8MjaO1btEHJg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm: split xen-syms linking rule
Message-Id: <E1x8wiM-009cS8-2y@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:23:02 +0000

commit 223ac5068a61eb98b9e1a859a711c45d81326204
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:17:48 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:00 2026 +0200

    Arm: split xen-syms linking rule
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    [re-]using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations.
    
    By re-using the generic rules introduced when the respective x86 rule was
    split,
    - the .map file now isn't created after the final binary anymore,
    - --strip-debug is passed to $(LD) during early linking passes (for
      consistency the option is also explicitly added to the optional linking
      pass rule),
    - CONFIG_{SUPPRESS_DUPLICATE_SYMBOL_WARNINGS,ENFORCE_UNIQUE_SYMBOLS} are
      now properly respected.
    Orphan section checking and erroring on duplicate symbols, otoh, are
    getting suppressed for now, until the about a dozen orphan section
    warnings and the one duplicate symbol error which would result have been
    taken care of.
    
    While the 4th linking step continues to be avoided when possible, a
    redundant invocation of $(NM) and tools/symbols (plus the assembling of
    the resulting .S file) is hopefully deemed acceptable.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
    Acked-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/Makefile     | 43 +++++++++----------------------------------
 xen/scripts/Makefile.link | 13 +++++++++++++
 2 files changed, 22 insertions(+), 34 deletions(-)

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index b7afd3e58c..e9b003610b 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -84,40 +84,15 @@ ifeq ($(CONFIG_ARM_64),y)
 	ln -sf $(@F) $@.efi
 endif
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	if ! { $(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o) >/dev/null; }; \
-	then \
-		set -e; \
-		$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-		    $(dot-target).2.o -o $(dot-target).2; \
-		$(NM) -pa --format=sysv $(dot-target).2 \
-			| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-			> $(dot-target).3.S; \
-		$(MAKE) $(build)=$(@D) $(dot-target).3.o; \
-		$(call compare-symbol-tables, $(dot-target).2.o, $(dot-target).3.o); \
-	else \
-		ln -sf $(dot-target).2.o $(dot-target).3.o; \
-	fi
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).3.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
+LAST_LINKING_PASS := 3
+
+include scripts/Makefile.link
+
+# Suppress orphan section checking for the time being.
+orphan-handling-y :=
+
+# Downgrade duplicate symbol errors to warnings for the time being.
+syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --warn-dup
 
 .PHONY: include
 include:
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
index 6d463a8514..4b8ae90eee 100644
--- a/xen/scripts/Makefile.link
+++ b/xen/scripts/Makefile.link
@@ -33,6 +33,19 @@ final-image-check-y ?= true
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
 	      $(build_id_linker) --strip-debug -o $@
 
+ifneq ($(LAST_LINKING_PASS),2)
+
+.$(TARGET)-syms.2: $(objtree)/prelink.o .$(TARGET)-syms.2.o $(obj)/xen.lds
+	if ! { $(call compare-symbol-tables, .$(TARGET)-syms.1.o, .$(TARGET)-syms.2.o) >/dev/null; }; \
+	then \
+		$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
+		      $(build_id_linker) --strip-debug -o $@; \
+	else \
+		ln -sf .$(TARGET)-syms.1 $@; \
+	fi
+
+endif
+
 .$(TARGET)-syms.$(LAST_LINKING_PASS): $(objtree)/prelink.o \
                                       .$(TARGET)-syms.$(LAST_LINKING_PASS).o \
                                       $(obj)/xen.lds
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:23:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:23:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428396.1651141 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wiY-0005IJ-7H; Tue, 22 Sep 2026 09:23:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428396.1651141; Tue, 22 Sep 2026 09:23:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wiY-0005IB-4Z; Tue, 22 Sep 2026 09:23:14 +0000
Received: by outflank-mailman (input) for mailman id 1428396;
 Tue, 22 Sep 2026 09:23:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wiX-0005I3-2h
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:23:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiW-00AlK3-2L
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiX-009d9L-03
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=1Uk2GRI1IOgvPxXIgExmPSMTChrq7q6t08I55sHRTgU=; b=I3c9/Gbo3AJDn0cTLTRqjZ87xr
	yR5SNIOqaqMQ9jJ90QT6MUeE3J8c8RcR5BdO/0JplUwTnoLeOcJseEpQdMmAAMyJ7KOocwwgLB8rE
	hF4J6QaFE9wuy1G1o4cmAC6fDaWPIHtZAXi1C/MLvNbWuE+kuMS7FINC4vrpKt9Yf+58=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] RISC-V: split xen-syms linking rule
Message-Id: <E1x8wiX-009d9L-03@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:23:13 +0000

commit 37cd2d7d4606197180094230a9e11f4e32850c49
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:18:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:17 2026 +0200

    RISC-V: split xen-syms linking rule
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    [re-]using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations.
    
    By re-using the generic rules introduced when the respective x86 rule was
    split,
    - the .map file now isn't created after the final binary anymore,
    - --strip-debug is passed to $(LD) during early linking passes (for
      consistency the option is also explicitly added to the optional linking
      pass rule),
    - CONFIG_{SUPPRESS_DUPLICATE_SYMBOL_WARNINGS,ENFORCE_UNIQUE_SYMBOLS} are
      now properly respected.
    Orphan section checking, otoh, is getting suppressed for now, until the
    about a dozen warnings which would result have been taken care of.
    
    While the 4th linking step continues to be avoided when possible, a
    redundant invocation of $(NM) and tools/symbols (plus the assembling of
    the resulting .S file) is hopefully deemed acceptable.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/Makefile | 40 ++++++----------------------------------
 1 file changed, 6 insertions(+), 34 deletions(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index fcd73c7a2d..511ced09ec 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -34,40 +34,12 @@ obj-y += vtimer.o
 $(TARGET): $(TARGET)-syms
 	$(OBJCOPY) -O binary -S $< $@
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	if ! { $(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o) >/dev/null; }; \
-	then \
-		set -e; \
-		$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-		    $(dot-target).2.o -o $(dot-target).2; \
-		$(NM) -pa --format=sysv $(dot-target).2 \
-			| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-			> $(dot-target).3.S; \
-		$(MAKE) $(build)=$(@D) $(dot-target).3.o; \
-		$(call compare-symbol-tables, $(dot-target).2.o, $(dot-target).3.o); \
-	else \
-		ln -sf $(dot-target).2.o $(dot-target).3.o; \
-	fi
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).3.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
+LAST_LINKING_PASS := 3
+
+include scripts/Makefile.link
+
+# Suppress orphan section checking for the time being.
+orphan-handling-y :=
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:23:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:23:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428397.1651146 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wii-0005KJ-9S; Tue, 22 Sep 2026 09:23:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428397.1651146; Tue, 22 Sep 2026 09:23:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wii-0005KB-5w; Tue, 22 Sep 2026 09:23:24 +0000
Received: by outflank-mailman (input) for mailman id 1428397;
 Tue, 22 Sep 2026 09:23:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wih-0005K5-5S
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:23:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wig-00AlKW-2d
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wih-009dmU-0L
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ILmyx43cZlPHuS3uZPpXnWlLL0cVdTbi7Ct6DU9O+/s=; b=dr1a4YbELDs+A4QLhUY4FxLXbm
	6lSuZ+1avo4lBTAa5QGQTnhGxveIKoliWeAdJQjuTkPXz+4zSIPTWW0RRc6GTl4k0YGczDWTQxRTA
	4WjpmduMQTQ6oWsl06GjfC3gs25sQVVmi469QpDPbuioVSh2OmE7f94iZkRLIoFa/jis=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] build: move $(all-symbols-*)
Message-Id: <E1x8wih-009dmU-0L@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:23:23 +0000

commit 0a609dc49ac5ea51ed553a779b6766a8bdbf8e86
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:20:10 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:24 2026 +0200

    build: move $(all-symbols-*)
    
    With the final linking logic now consolidated in scripts/Makefile.link,
    $(all-symbols-*) also doesn't need setting anymore in (and passing down
    from) the top level Makefile.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/Makefile              | 7 +------
 xen/arch/x86/Makefile     | 4 ++--
 xen/scripts/Makefile.link | 8 ++++++--
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 8c56295493..52ea283f5c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -465,10 +465,6 @@ ALL_OBJS-$(CONFIG_CRYPTO) += crypto/built_in.o
 ARCH_LIBS-y               :=
 ALL_LIBS-y                := lib/lib.a
 
-all-symbols-y :=
-all-symbols-$(CONFIG_LIVEPATCH) += --all-symbols
-all-symbols-$(CONFIG_FAST_SYMBOL_LOOKUP) += --sort-by-name
-
 include $(srctree)/arch/$(SRCARCH)/arch.mk
 
 # define new variables to avoid the ones defined in Config.mk
@@ -622,8 +618,7 @@ $(TARGET): outputmakefile asm-generic FORCE
 	$(Q)$(MAKE) $(build)=arch/$(SRCARCH) include
 	$(Q)$(MAKE) $(build)=. arch/$(SRCARCH)/include/asm/asm-offsets.h
 	$(Q)$(MAKE) $(build)=. MKRELOC=$(MKRELOC) 'ALL_OBJS=$(ALL_OBJS-y)' \
-	            'ALL_LIBS=$(ARCH_LIBS-y) $(ALL_LIBS-y)' \
-	            'all_symbols=$(all-symbols-y)' $@
+	            'ALL_LIBS=$(ARCH_LIBS-y) $(ALL_LIBS-y)' $@
 
 SUBDIRS = xsm arch common crypto drivers lib test
 define all_sources
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 8a205c3d27..2be90ea098 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -183,14 +183,14 @@ ifeq ($(XEN_BUILD_PE),y)
 	$(MKRELOC) $(filter .$(TARGET).efi.%, $^) > $@
 
 .$(TARGET).efi.0s.S:
-	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+	$(objtree)/tools/symbols $(all-symbols-y) --empty > $@
 
 .$(TARGET).efi.1s.S: .$(TARGET).efi.0
 .$(TARGET).efi.2s.S: .$(TARGET).efi.1
 
 .$(TARGET).efi.%s.S:
 	$(NM) -pa --format=sysv $< \
-	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+	  | $(objtree)/tools/symbols $(all-symbols-y) --sysv --sort \
 	    --source-name=$(TARGET).efi.S \
 	  > $@
 
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
index 4b8ae90eee..11d3fc48da 100644
--- a/xen/scripts/Makefile.link
+++ b/xen/scripts/Makefile.link
@@ -3,6 +3,10 @@
 # Helper rules for linking xen-syms
 # ==========================================================================
 
+all-symbols-y :=
+all-symbols-$(CONFIG_LIVEPATCH) += --all-symbols
+all-symbols-$(CONFIG_FAST_SYMBOL_LOOKUP) += --sort-by-name
+
 syms-warn-dup-y := --warn-dup
 syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
 syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup
@@ -17,7 +21,7 @@ final-image-check-y ?= true
 	$(call cmd,cc_o_S)
 
 .$(TARGET)-syms.0.S:
-	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+	$(objtree)/tools/symbols $(all-symbols-y) --empty > $@
 
 .$(TARGET)-syms.1.S: .$(TARGET)-syms.0
 .$(TARGET)-syms.2.S: .$(TARGET)-syms.1
@@ -25,7 +29,7 @@ final-image-check-y ?= true
 
 .$(TARGET)-syms.%.S:
 	$(NM) -pa --format=sysv $< \
-	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+	  | $(objtree)/tools/symbols $(all-symbols-y) --sysv --sort \
 	    $(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
 	  > $@
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:23:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:23:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428398.1651149 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wis-0005Ml-BL; Tue, 22 Sep 2026 09:23:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428398.1651149; Tue, 22 Sep 2026 09:23:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wis-0005Md-8n; Tue, 22 Sep 2026 09:23:34 +0000
Received: by outflank-mailman (input) for mailman id 1428398;
 Tue, 22 Sep 2026 09:23:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wir-0005MW-88
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:23:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wiq-00AlKz-2t
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wir-009eUW-0d
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=uQPug30ErdRDzB5dnuOQ8UtYCa5UorH/ZgBcHnFSTYw=; b=BVoMTYF+xm3HpJ6wNiw9ApxLDH
	jQk+ta8fPSGeflHzmJ0mOR1pK9SBi2KybwJlorMBE06+0NeC6eZ/4DdInROydL2uTV9EU7YU3XU/8
	sS8eYA1fbQ9cG38XxY+Phve2FQMEEjCnZay2U0WKwXT4p0sO8kw7SY4k44Q9A83h/GTY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] build: move $(compare-symbol-tables)
Message-Id: <E1x8wir-009eUW-0d@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:23:33 +0000

commit 06438aead654bb53dc500a1a7b69a38c845a895d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:20:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:28 2026 +0200

    build: move $(compare-symbol-tables)
    
    With the final linking logic now consolidated in scripts/Makefile.link,
    $(compare-symbol-tables) also doesn't need setting anymore in
    Kbuild.include.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/scripts/Kbuild.include | 13 -------------
 xen/scripts/Makefile.link  | 12 ++++++++++++
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include
index 41483513ac..c2e4ec811b 100644
--- a/xen/scripts/Kbuild.include
+++ b/xen/scripts/Kbuild.include
@@ -56,19 +56,6 @@ define filechk
 	fi
 endef
 
-###
-# Compare the symbol tables of two object files.  As diff's -I option isn't
-# standardized, the name difference of the two object files needs abstracting
-# out.
-define compare-symbol-tables
-    ln -f $(1) $(@D)/.cst.$$$$; \
-    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(1).sym; \
-    ln -f $(2) $(@D)/.cst.$$$$; \
-    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(2).sym; \
-    rm -f $(@D)/.cst.$$$$; \
-    diff -u $(1).sym $(2).sym
-endef
-
 # as-insn: Check whether assembler supports an instruction.
 # Usage: cflags-y += $(call as-insn,CC FLAGS,"insn",option-yes,option-no)
 as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
index 11d3fc48da..dda38da2c3 100644
--- a/xen/scripts/Makefile.link
+++ b/xen/scripts/Makefile.link
@@ -33,6 +33,18 @@ final-image-check-y ?= true
 	    $(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
 	  > $@
 
+# Compare the symbol tables of two object files.  As diff's -I option isn't
+# standardized, the name difference of the two object files needs abstracting
+# out.
+define compare-symbol-tables
+    ln -f $(1) $(@D)/.cst.$$$$; \
+    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(1).sym; \
+    ln -f $(2) $(@D)/.cst.$$$$; \
+    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(2).sym; \
+    rm -f $(@D)/.cst.$$$$; \
+    diff -u $(1).sym $(2).sym
+endef
+
 .$(TARGET)-syms.%: $(objtree)/prelink.o .$(TARGET)-syms.%.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
 	      $(build_id_linker) --strip-debug -o $@
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:23:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:23:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428399.1651152 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wj2-0005Oo-CZ; Tue, 22 Sep 2026 09:23:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428399.1651152; Tue, 22 Sep 2026 09:23:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wj2-0005Og-A4; Tue, 22 Sep 2026 09:23:44 +0000
Received: by outflank-mailman (input) for mailman id 1428399;
 Tue, 22 Sep 2026 09:23:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wj1-0005Oa-B7
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:23:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wj0-00AlLd-3C
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wj1-009fGv-0v
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=14vhrPCvGvN7bglCE91rYgpYVhpL2QqapMHHn6qYvBU=; b=0dBnKSpb8yJDuzabDSTRRcocZj
	3+n8XPkIBU++ye0LMe7J/3mikkjdg5jrBjiRlb0wn76/JfRu1MJPkRRJeRKE3kTm4+5wvz1moKC9b
	JZweKr1ar3KlDR3dohZJpSnqjKB4wY09g3biMLiLiDIoL8sxmmV6T5GyvAm7sFRSVX5o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] vmx: Handle TDX instruction exit reasons
Message-Id: <E1x8wj1-009fGv-0v@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:23:43 +0000

commit 755c9fbbfe4bcd8671a6621ae050f45441300579
Author:     Teddy Astie <teddy.astie@vates.tech>
AuthorDate: Tue Sep 22 09:22:12 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:37 2026 +0200

    vmx: Handle TDX instruction exit reasons
    
    On hardware that supports TDX, guests can cause VMEXIT related to
    TDX instructions (SEAMCALL and TDCALL) regardless of VMCS configuration.
    
    Currently, that causes the domain to crash when a domain tries to
    use these instructions in kernel-mode, and emit #UD when used in user-mode.
    
    Adjust the behavior so that the guest always gets #UD when trying to
    use these instructions regardless of the privilege level that the vCPU
    is running.
    
    In the nested virtualization case, also reinject the exit reason to L1
    rather than failing on "Unhandled nested vmexit" (leading to a L1 crash
    that can be caused by L2 by executing one of the TDX instructions).
    
    Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/vmx/vmx.c             | 2 ++
 xen/arch/x86/hvm/vmx/vvmx.c            | 2 ++
 xen/arch/x86/include/asm/hvm/vmx/vmx.h | 2 ++
 xen/arch/x86/include/asm/perfc_defn.h  | 2 +-
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 7fa404878a..181aecc2fb 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -4681,6 +4681,8 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
     case EXIT_REASON_MWAIT_INSTRUCTION:
     case EXIT_REASON_MONITOR_INSTRUCTION:
     case EXIT_REASON_GETSEC:
+    case EXIT_REASON_SEAMCALL:
+    case EXIT_REASON_TDCALL:
         /*
          * We should never exit on GETSEC because CR4.SMXE is always 0 when
          * running in guest context, and the CPU checks that before getting
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index e2407f07c2..dd34fea6d9 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2497,6 +2497,8 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
     case EXIT_REASON_INVEPT:
     case EXIT_REASON_XSETBV:
     case EXIT_REASON_INVVPID:
+    case EXIT_REASON_SEAMCALL:
+    case EXIT_REASON_TDCALL:
         /* inject to L1 */
         nvcpu->nv_vmexit_pending = 1;
         break;
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
index 713d0900a9..b7b8bc0c84 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
@@ -201,6 +201,8 @@ static inline void pi_clear_sn(struct pi_desc *pi_desc)
 #define EXIT_REASON_XRSTORS             64
 #define EXIT_REASON_BUS_LOCK            74
 #define EXIT_REASON_NOTIFY              75
+#define EXIT_REASON_SEAMCALL            76
+#define EXIT_REASON_TDCALL              77
 /* Remember to also update VMX_PERF_EXIT_REASON_SIZE! */
 
 /*
diff --git a/xen/arch/x86/include/asm/perfc_defn.h b/xen/arch/x86/include/asm/perfc_defn.h
index ac7439b992..102b9be6ef 100644
--- a/xen/arch/x86/include/asm/perfc_defn.h
+++ b/xen/arch/x86/include/asm/perfc_defn.h
@@ -6,7 +6,7 @@ PERFCOUNTER_ARRAY(exceptions,           "exceptions", 32)
 
 #ifdef CONFIG_HVM
 
-#define VMX_PERF_EXIT_REASON_SIZE 76
+#define VMX_PERF_EXIT_REASON_SIZE 78
 #define VMEXIT_NPF_PERFC 166
 #define SVM_PERF_EXIT_REASON_SIZE (VMEXIT_NPF_PERFC + 1)
 PERFCOUNTER_ARRAY(vmexits,              "vmexits",
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:23:58 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:23:58 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428400.1651157 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wjC-0005R5-ET; Tue, 22 Sep 2026 09:23:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428400.1651157; Tue, 22 Sep 2026 09:23:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wjC-0005Qx-BY; Tue, 22 Sep 2026 09:23:54 +0000
Received: by outflank-mailman (input) for mailman id 1428400;
 Tue, 22 Sep 2026 09:23:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wjB-0005Qp-E5
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:23:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wjB-00AlM6-0G
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wjB-009g6q-1E
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:23:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=2pn9Z+K5RPmDLO1vXWkNbIUUwq3x5fN2VtengPCKS1g=; b=tgYaS6y27lQfxnS8aVtCKHjpHr
	VfDCRqHe/0Iu/i6fc7MOZGezMUTc+Dn0p0cdwXUMRtthcYc6WkgMf1jFH8KqNxxF/UmoundDijznB
	dje4Evn5hYqGy7iL+C50bO8nQjGLFSza6iajeEZzxGuy1a2JREgvN0bcPdXWLkGmunRg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/vpmu: Fix incorrect printk format specifiers
Message-Id: <E1x8wjB-009g6q-1E@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:23:53 +0000

commit cfd4e99d18d02cfbcf2e77d10be6eb5928662f33
Author:     Alejandro Vallejo <alejandro.garciavallejo@amd.com>
AuthorDate: Tue Sep 22 09:22:54 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:43 2026 +0200

    x86/vpmu: Fix incorrect printk format specifiers
    
    The patch in Fixes adjusted two vendor variables from uint8_t and plain
    int to to unsigned int. But they were both used later in printks with
    the %d specifier rather than %u. Adjust accordingly.
    
    Fixes: 39a9a49449d7 ("x86: Remove x86 prefixed names from x86/cpu/ files")
    Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/cpu/vpmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
index 470f5ec98d..e0f7edded3 100644
--- a/xen/arch/x86/cpu/vpmu.c
+++ b/xen/arch/x86/cpu/vpmu.c
@@ -417,7 +417,7 @@ static int vpmu_arch_initialise(struct vcpu *v)
     {
         if ( vpmu_mode != XENPMU_MODE_OFF )
         {
-            printk(XENLOG_G_WARNING "VPMU: Unknown CPU vendor %d. "
+            printk(XENLOG_G_WARNING "VPMU: Unknown CPU vendor %u. "
                    "Disabling VPMU\n", vendor);
             opt_vpmu_enabled = 0;
             vpmu_mode = XENPMU_MODE_OFF;
@@ -849,7 +849,7 @@ static int __init cf_check vpmu_init(void)
 #endif
 
     default:
-        printk(XENLOG_WARNING "VPMU: Unknown CPU vendor: %d. "
+        printk(XENLOG_WARNING "VPMU: Unknown CPU vendor: %u. "
                "Turning VPMU off.\n", vendor);
         break;
     }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:24:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:24:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428401.1651160 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wjM-0005T0-FS; Tue, 22 Sep 2026 09:24:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428401.1651160; Tue, 22 Sep 2026 09:24:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8wjM-0005Ss-Cu; Tue, 22 Sep 2026 09:24:04 +0000
Received: by outflank-mailman (input) for mailman id 1428401;
 Tue, 22 Sep 2026 09:24:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8wjL-0005Sk-Hw
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:24:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wjL-00AlN0-0b
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:24:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8wjL-009gtF-1Z
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:24:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qsJ51cJ8aQq/QeQiCNXi05VXiPwDyeicZJCUFuVFWVA=; b=BUKCgtWIol7w1XS0ZHYTYfq+NI
	7ZSRMoulKrZR7ylyX5zpwfHEIhP7DRNW/KvHX+BGQ+G88uZuumRCXcEhKejlCPsk/ZKufmjHApRPT
	TU88eWvX3kHm5Gb67QNeVZBJmxPUP9W7p57hVFi1DNP78C2iFCZ05+wdK6AtaVO1reo4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/HVM: replace paging_mode_hap() uses
Message-Id: <E1x8wjL-009gtF-1Z@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:24:03 +0000

commit 8d70af242d7ab641504c5c2932bd82245f817fca
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:23:57 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:48 2026 +0200

    x86/HVM: replace paging_mode_hap() uses
    
    HVM guests cannot run without either HAP or shadow enabled. While
    paging_mode_shadow() is compile-time-constant when SHADOW_PAGING=n,
    paging_mode_hap() isn't. Hence the former is preferred to leverage DCE.
    
    In svm_update_guest_cr() combine two adjacent conditionals.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/dom0_build.c    |  2 +-
 xen/arch/x86/hvm/svm/nestedsvm.c | 12 ++++++------
 xen/arch/x86/hvm/svm/svm.c       | 13 ++++++-------
 xen/arch/x86/hvm/svm/vmcb.c      |  2 +-
 xen/arch/x86/hvm/vmx/vmcs.c      | 12 ++++++------
 xen/arch/x86/hvm/vmx/vmx.c       | 14 +++++++-------
 xen/arch/x86/hvm/vmx/vvmx.c      |  2 +-
 7 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index aa06cdb2f7..881e8e21b0 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -473,7 +473,7 @@ static int __init pvh_populate_p2m(struct domain *d)
         }
     }
 
-    if ( using_vmx() && paging_mode_hap(d) && !vmx_unrestricted_guest(v) )
+    if ( using_vmx() && !paging_mode_shadow(d) && !vmx_unrestricted_guest(v) )
     {
         /*
          * Since Dom0 cannot be migrated, we will only setup the
diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index a8b15d6eae..81579370b8 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -8,7 +8,7 @@
 #include <asm/hvm/support.h>
 #include <asm/hvm/svm.h>
 #include <asm/hvm/nestedhvm.h>
-#include <asm/paging.h> /* paging_mode_hap */
+#include <asm/paging.h> /* paging_mode_(hap|shadow)() */
 #include <asm/event.h> /* for local_event_delivery_(en|dis)able */
 #include <asm/p2m.h> /* p2m_get_pagetable, p2m_get_nestedp2m */
 #include <asm/x86_emulate.h>
@@ -243,7 +243,7 @@ static int nsvm_vcpu_hostrestore(struct vcpu *v, struct cpu_user_regs *regs)
         /* host nested paging + guest nested paging. */
         /* hvm_set_cr3() below sets v->arch.hvm.guest_cr[3] for us. */
     }
-    else if ( paging_mode_hap(v->domain) )
+    else if ( !paging_mode_shadow(v->domain) )
     {
         /* host nested paging + guest shadow paging. */
         /* hvm_set_cr3() below sets v->arch.hvm.guest_cr[3] for us. */
@@ -525,7 +525,7 @@ static int nsvm_vmcb_prepare4vmrun(struct vcpu *v, struct cpu_user_regs *regs)
         if ( rc != X86EMUL_OKAY )
             gdprintk(XENLOG_ERR, "hvm_set_cr3 failed, rc: %u\n", rc);
     }
-    else if ( paging_mode_hap(v->domain) )
+    else if ( !paging_mode_shadow(v->domain) )
     {
         /* host nested paging + guest shadow paging. */
         vmcb_set_np(n2vmcb, true);
@@ -1033,7 +1033,7 @@ nsvm_vmcb_prepare4vmexit(struct vcpu *v, struct cpu_user_regs *regs)
          * unshadowed guest h_cr3 is kept in ns_vmcb->h_cr3,
          * hence we keep the ns_vmcb->h_cr3 value. */
     }
-    else if ( paging_mode_hap(v->domain) )
+    else if ( !paging_mode_shadow(v->domain) )
     {
         /* host nested paging + guest shadow paging. */
         vmcb_set_np(ns_vmcb, false);
@@ -1260,7 +1260,7 @@ nestedsvm_check_intercepts(struct vcpu *v, struct cpu_user_regs *regs,
             /* host nested paging + guest nested paging */
             return NESTEDHVM_VMEXIT_HOST;
         }
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             if ( is_intercepted )
                 return NESTEDHVM_VMEXIT_FATALERROR;
@@ -1559,7 +1559,7 @@ void svm_nested_features_on_efer_update(struct vcpu *v)
     if ( nsvm_efer_svm_enabled(v) )
     {
         if ( !vmcb->virt_ext.fields.vloadsave_enable &&
-             paging_mode_hap(v->domain) &&
+             !paging_mode_shadow(v->domain) &&
              cpu_has_svm_vloadsave )
         {
             vmcb->virt_ext.fields.vloadsave_enable = 1;
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index e6a0edcf71..71e48351f2 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -113,7 +113,8 @@ static void cf_check svm_update_guest_cr(
     switch ( cr )
     {
     case 0:
-        if ( paging_mode_hap(v->domain) )
+        value = v->arch.hvm.guest_cr[0];
+        if ( !paging_mode_shadow(v->domain) )
         {
             uint32_t intercepts = vmcb_get_cr_intercepts(vmcb);
 
@@ -122,9 +123,7 @@ static void cf_check svm_update_guest_cr(
                  monitor_ctrlreg_bitmask(VM_EVENT_X86_CR3) )
                vmcb_set_cr_intercepts(vmcb, intercepts | CR_INTERCEPT_CR3_WRITE);
         }
-
-        value = v->arch.hvm.guest_cr[0];
-        if ( paging_mode_shadow(v->domain) )
+        else
             value |= X86_CR0_PG | X86_CR0_WP;
         vmcb_set_cr0(vmcb, value);
         break;
@@ -148,7 +147,7 @@ static void cf_check svm_update_guest_cr(
         break;
     case 4:
         value = HVM_CR4_HOST_MASK;
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
             value &= ~X86_CR4_PAE;
         value |= v->arch.hvm.guest_cr[4];
 
@@ -418,7 +417,7 @@ static int svm_vmcb_restore(struct vcpu *v, struct hvm_hw_cpu *c)
     svm_update_guest_cr(v, 0, 0);
     svm_update_guest_cr(v, 4, 0);
 
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         vmcb_set_np(vmcb, true);
         vmcb_set_g_pat(vmcb, MSR_IA32_CR_PAT_RESET /* guest PAT */);
@@ -2519,7 +2518,7 @@ void asmlinkage svm_vmexit_handler(void)
         regs, !(vmcb_get_efer(vmcb) & EFER_LMA) || !(vmcb->cs.l));
 
     v->arch.hvm.guest_cr[2] = vmcb_get_cr2(vmcb);
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         v->arch.hvm.guest_cr[0] = vmcb_get_cr0(vmcb);
         v->arch.hvm.guest_cr[3] = v->arch.hvm.hw_cr[3] = vmcb_get_cr3(vmcb);
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index d069280a4d..a6f09672a7 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -143,7 +143,7 @@ static int construct_vmcb(struct vcpu *v)
 
     vmcb->_exception_intercepts = HVM_TRAP_MASK;
 
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         vmcb_set_np(vmcb, true); /* enable nested paging */
         vmcb->_g_pat = MSR_IA32_CR_PAT_RESET; /* guest PAT */
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 8e52ef4d49..8ec7ae7403 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -1141,7 +1141,7 @@ static int construct_vmcs(struct vcpu *v)
           SECONDARY_EXEC_ENABLE_VM_FUNCTIONS |
           SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS);
 
-    if ( paging_mode_hap(d) )
+    if ( !paging_mode_shadow(d) )
     {
         v->arch.hvm.vmx.exec_control &= ~(CPU_BASED_INVLPG_EXITING |
                                           CPU_BASED_CR3_LOAD_EXITING |
@@ -1203,7 +1203,7 @@ static int construct_vmcs(struct vcpu *v)
         vmx_clear_msr_intercept(v, MSR_IA32_SYSENTER_CS, VMX_MSR_RW);
         vmx_clear_msr_intercept(v, MSR_IA32_SYSENTER_ESP, VMX_MSR_RW);
         vmx_clear_msr_intercept(v, MSR_IA32_SYSENTER_EIP, VMX_MSR_RW);
-        if ( paging_mode_hap(d) && (!is_iommu_enabled(d) || iommu_snoop) )
+        if ( !paging_mode_shadow(d) && (!is_iommu_enabled(d) || iommu_snoop) )
             vmx_clear_msr_intercept(v, MSR_IA32_CR_PAT, VMX_MSR_RW);
         if ( (vmexit_ctl & VM_EXIT_CLEAR_BNDCFGS) &&
              (vmentry_ctl & VM_ENTRY_LOAD_BNDCFGS) )
@@ -1326,8 +1326,8 @@ static int construct_vmcs(struct vcpu *v)
     __vmwrite(GUEST_DR7, 0);
     __vmwrite(VMCS_LINK_POINTER, ~0UL);
 
-    v->arch.hvm.vmx.exception_bitmap = HVM_TRAP_MASK
-              | (paging_mode_hap(d) ? 0 : (1U << X86_EXC_PF));
+    v->arch.hvm.vmx.exception_bitmap = HVM_TRAP_MASK |
+        (!paging_mode_shadow(d) ? 0 : (1U << X86_EXC_PF));
 
     if ( cpu_has_vmx_notify_vm_exiting )
         __vmwrite(NOTIFY_WINDOW, vm_notify_window);
@@ -1347,7 +1347,7 @@ static int construct_vmcs(struct vcpu *v)
         __vmwrite(TPR_THRESHOLD, 0);
     }
 
-    if ( paging_mode_hap(d) )
+    if ( !paging_mode_shadow(d) )
     {
         struct p2m_domain *p2m = p2m_get_hostp2m(d);
         struct ept_data *ept = &p2m->ept;
@@ -1377,7 +1377,7 @@ static int construct_vmcs(struct vcpu *v)
 
     vmx_vlapic_msr_changed(v);
 
-    if ( opt_l1d_flush && paging_mode_hap(d) )
+    if ( opt_l1d_flush && !paging_mode_shadow(d) )
         rc = vmx_add_msr(v, MSR_FLUSH_CMD, FLUSH_CMD_L1D,
                          VMX_MSR_GUEST_LOADONLY);
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 181aecc2fb..6237623a4c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1707,7 +1707,7 @@ static void cf_check vmx_update_guest_cr(
         if ( paging_mode_shadow(v->domain) )
             hw_cr0_mask |= X86_CR0_WP;
 
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             /* Manage GUEST_CR3 when CR0.PE=0. */
             uint32_t old_ctls = v->arch.hvm.vmx.exec_control;
@@ -1772,7 +1772,7 @@ static void cf_check vmx_update_guest_cr(
         /* Fallthrough: Changing CR0 can change some bits in real CR4. */
     case 4:
         v->arch.hvm.hw_cr[4] = HVM_CR4_HOST_MASK;
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
             v->arch.hvm.hw_cr[4] &= ~X86_CR4_PAE;
 
         if ( !nestedhvm_vcpu_in_guestmode(v) )
@@ -1792,7 +1792,7 @@ static void cf_check vmx_update_guest_cr(
              * two subtly complicated cases.
              */
 
-            if ( paging_mode_hap(v->domain) )
+            if ( !paging_mode_shadow(v->domain) )
             {
                 /*
                  * On hardware lacking the Unrestricted Guest feature (or with
@@ -1824,7 +1824,7 @@ static void cf_check vmx_update_guest_cr(
          * unconditionally trapping more CR4 bits, at which point the
          * performance benefit of doing this is quite dubious.
          */
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             /*
              * Update CR4 host mask to only trap when the guest tries to set
@@ -1860,7 +1860,7 @@ static void cf_check vmx_update_guest_cr(
         break;
 
     case 3:
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             if ( !hvm_paging_enabled(v) && !vmx_unrestricted_guest(v) )
                 v->arch.hvm.hw_cr[3] =
@@ -4190,7 +4190,7 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
 
     hvm_sanitize_regs_fields(regs, !(cs_ar_bytes & X86_SEG_AR_CS_LM_ACTIVE));
 
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         /*
          * Xen allows the guest to modify some CR4 bits directly, update cached
@@ -4979,7 +4979,7 @@ bool asmlinkage vmx_vmenter_helper(const struct cpu_user_regs *regs)
     if ( unlikely(need_flush) )
         vpid_sync_all();
 
-    if ( paging_mode_hap(curr->domain) )
+    if ( !paging_mode_shadow(curr->domain) )
     {
         struct ept_data *ept = &p2m_get_hostp2m(currd)->ept;
         unsigned int cpu = smp_processor_id();
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index dd34fea6d9..82273b6612 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2458,7 +2458,7 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
          */
         if ( vector == X86_EXC_PF )
         {
-            if ( paging_mode_hap(v->domain) )
+            if ( !paging_mode_shadow(v->domain) )
                 nvcpu->nv_vmexit_pending = 1;
         }
         else if ( (intr_info & valid_mask) == valid_mask )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:44:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:44:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428424.1651188 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x2h-0000s0-Bh; Tue, 22 Sep 2026 09:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428424.1651188; Tue, 22 Sep 2026 09:44:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x2h-0000ru-8U; Tue, 22 Sep 2026 09:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1428424;
 Tue, 22 Sep 2026 09:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x2g-0000rl-G4
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x2f-00AmVQ-2l
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x2g-00BGWz-0T
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=tWFoXvadPEv8EYvczl9DVBItSuvlT4tgiLyxp8Bhwx0=; b=ReuuRbDClH9/JHpJWtXB5P3qSA
	jTSQiM+mA4ZWLpTVqPbUvG3QhUODozvFXyNF6j/wetUO73Yo4KbFx9uRf32mIkOyLIDd2leb7A8RM
	DGN5xzJWVAhM1Y1qk/4O8TgsSuYeO3kxlT19+Cit1SThjZzS0kFqveW6UbJxYqGEpT90=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: mask debug exceptions in initial AArch64 guest state
Message-Id: <E1x8x2g-00BGWz-0T@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:44:02 +0000

commit 5c84622f4f32e4e01be792f5b8f63459c843b891
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Fri Jun 19 20:37:38 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:54:02 2026 +0200

    xen/arm: mask debug exceptions in initial AArch64 guest state
    
    PSR_GUEST64_INIT currently masks SError, IRQ and FIQ, but leaves debug
    exceptions unmasked. Both the AArch64 Linux boot protocol and PSCI entry
    requirements expect PSTATE.DAIF to be masked.
    
    Add PSR_DBG_MASK to PSR_GUEST64_INIT. This fixes the initial AArch64 guest
    entry state as well as virtual PSCI CPU_ON and SYSTEM_SUSPEND resume entry.
    
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    (cherry picked from commit ad8663a75aa8db4255d6690bfc210d559edc9f5b)
---
 xen/include/public/arch-arm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 7d6f87e8b2..00de30b896 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -420,7 +420,8 @@ typedef uint64_t xen_callback_t;
  * zImage kernels on aarch32.
  */
 #define PSR_GUEST32_INIT (PSR_Z|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+#define PSR_GUEST64_INIT \
+    (PSR_DBG_MASK|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
 
 #define SCTLR_GUEST_INIT    xen_mk_ullong(0x00c50078)
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:44:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428425.1651191 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x2r-0000ug-Dl; Tue, 22 Sep 2026 09:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428425.1651191; Tue, 22 Sep 2026 09:44:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x2r-0000uY-B9; Tue, 22 Sep 2026 09:44:13 +0000
Received: by outflank-mailman (input) for mailman id 1428425;
 Tue, 22 Sep 2026 09:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x2q-0000uQ-9d
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x2p-00AmVw-32
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x2q-00BHN2-0k
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zu9IsL85cgjtYsDUTD3eQK76m144MSj31NYgI430JQ0=; b=SLKbdAdHvyHzSzUTZVl8AEyIXz
	/ddKkufz2QhwvrIFs4mYCSEqIX1b4/2zYOnN9tRkDA+qdYkkr20IsUJhZxyaNyDWDlSJHUhAOkXoW
	wI4xpZEoteljEPnAfA0dObuC1J5KWcql8spvqVLMNRig37CTdovYQScqpKlYXU260gEo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
Message-Id: <E1x8x2q-00BHN2-0k@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:44:12 +0000

commit a6382ae784ea2f8bd1c846ba0b63913d23002e45
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Aug 5 14:11:24 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:55:37 2026 +0200

    xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
    
    process_domain_node() parses "xen,static-mem" regardless of
    CONFIG_STATIC_MEMORY. With the feature off, init_staticmem_pages() is a
    no-op stub, so boot carries on until construct_domU() reaches the
    ASSERT_UNREACHABLE() stubs of allocate_static_memory() /
    assign_static_memory_11(): a debug build trips the assertion, a production
    build gives the domain no memory at all.
    
    Bail out at parse time instead, like process_shm_node() already does for
    CONFIG_STATIC_SHM.
    
    Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
    (cherry picked from commit e888192d133eeec8a94275eaf4194117f198a7e2)
---
 xen/common/device-tree/bootinfo-fdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/common/device-tree/bootinfo-fdt.c b/xen/common/device-tree/bootinfo-fdt.c
index 272b5a6c0a..ca64daf4cd 100644
--- a/xen/common/device-tree/bootinfo-fdt.c
+++ b/xen/common/device-tree/bootinfo-fdt.c
@@ -349,6 +349,12 @@ static int __init process_domain_node(const void *fdt, int node,
         /* No "xen,static-mem" present. */
         return 0;
 
+    if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
+    {
+        printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n");
+        return -EINVAL;
+    }
+
     return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells,
                                    size_cells, bootinfo_get_reserved_mem(),
                                    MEMBANK_STATIC_DOMAIN);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:44:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:44:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428426.1651195 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x31-0000x7-FT; Tue, 22 Sep 2026 09:44:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428426.1651195; Tue, 22 Sep 2026 09:44:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x31-0000wz-Cc; Tue, 22 Sep 2026 09:44:23 +0000
Received: by outflank-mailman (input) for mailman id 1428426;
 Tue, 22 Sep 2026 09:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x30-0000wp-CY
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x30-00AmWQ-07
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x30-00BIB9-12
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eraDpTAGi98AsGpFCLNdun5YJGlL0WS/uR8wCKe7/hk=; b=42ewzYhSiRfQGceZdy3rqiU8h+
	j/LruD4FCzKsGUt5cT2v22t2rEfHys44+2gWH4a5JFg4BcRQrAdO2AYhwJfwK2NgtZXXOwy+v+1lp
	ZRuIA8f8bYYKLAg8rH/F7VOjPUZM1jL/iBoPlrwkAYPJYBZ1M4hAUvqaInbVAUATkE8g=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: propagate secondary GIC initialization failures
Message-Id: <E1x8x30-00BIB9-12@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:44:22 +0000

commit 39b09ab61fbe759af2d6fc43f3d48dd8d11e7832
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Mon Aug 10 22:41:46 2026 +0300
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:56:01 2026 +0200

    xen/arm: propagate secondary GIC initialization failures
    
    The GICv3 secondary_init() callback can fail while discovering or
    waking a Redistributor, enabling LPIs, or setting up an ITS collection.
    gic_init_secondary_cpu() currently discards that status. start_secondary()
    then marks the CPU online even though its per-CPU GIC interface may be
    unusable.
    
    Return the callback status through the common GIC layer. Have
    start_secondary() report the failure and stop the affected CPU before it
    updates system features or is added to cpu_online_map.
    
    Fixes: bc183a0235e0 ("xen/arm: Add support for GIC v3")
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit 0102b592f46ff3f0784e693efa0b812551345271)
---
 xen/arch/arm/gic.c             | 10 ++++++++--
 xen/arch/arm/include/asm/gic.h |  2 +-
 xen/arch/arm/smpboot.c         | 11 +++++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index ee75258fc3..078049e741 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -282,11 +282,17 @@ void smp_send_state_dump(unsigned int cpu)
 }
 
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
-void gic_init_secondary_cpu(void)
+int gic_init_secondary_cpu(void)
 {
-    gic_hw_ops->secondary_init();
+    int rc = gic_hw_ops->secondary_init();
+
+    if ( rc )
+        return rc;
+
     /* Clear LR mask for secondary cpus */
     clear_cpu_lr_mask();
+
+    return 0;
 }
 
 /* Shut down the per-CPU GIC interface */
diff --git a/xen/arch/arm/include/asm/gic.h b/xen/arch/arm/include/asm/gic.h
index ff22dea40d..ee2c26adb4 100644
--- a/xen/arch/arm/include/asm/gic.h
+++ b/xen/arch/arm/include/asm/gic.h
@@ -291,7 +291,7 @@ extern void gic_preinit(void);
 /* Bring up the interrupt controller, and report # cpus attached */
 extern void gic_init(void);
 /* Bring up a secondary CPU's per-CPU GIC interface */
-extern void gic_init_secondary_cpu(void);
+extern int gic_init_secondary_cpu(void);
 /* Take down a CPU's per-CPU GIC interface */
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 7f3cfa812e..b7966b3f90 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -318,6 +318,7 @@ smp_prepare_cpus(void)
 void asmlinkage noreturn start_secondary(void)
 {
     unsigned int cpuid = init_data.cpuid;
+    int rc;
 
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
@@ -365,6 +366,14 @@ void asmlinkage noreturn start_secondary(void)
         stop_cpu();
     }
 
+    rc = gic_init_secondary_cpu();
+    if ( rc )
+    {
+        printk(XENLOG_ERR "CPU%u: Failed to initialize the GIC: %d\n",
+               smp_processor_id(), rc);
+        stop_cpu();
+    }
+
     /*
      * system features must be updated only if we do not stop the core or
      * we might disable features due to a non used core (for example when
@@ -372,8 +381,6 @@ void asmlinkage noreturn start_secondary(void)
      */
     update_system_features(&current_cpu_data);
 
-    gic_init_secondary_cpu();
-
     set_current(idle_vcpu[cpuid]);
 
     /* Run local notifiers */
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:44:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:44:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428427.1651199 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3B-0000zS-GZ; Tue, 22 Sep 2026 09:44:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428427.1651199; Tue, 22 Sep 2026 09:44:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3B-0000zK-Dy; Tue, 22 Sep 2026 09:44:33 +0000
Received: by outflank-mailman (input) for mailman id 1428427;
 Tue, 22 Sep 2026 09:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x3A-0000zC-Ff
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3A-00AmWs-0P
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3A-00BJ1f-1M
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=k+WKnFGXDJ9qHnXWAGY3ZiRhBPzn7yKRuZLZGhyY200=; b=MsArR8zEyH7T6UtTqKni4fW1Yj
	O5GvRWC0+zuoygekO5irob0XNFSdiw7a3DF7rGdHsxTerkHquX9E89L43ctYrgMfrILkuCkcP1NpK
	eOPlkWUIcLZgwY5h2nSveBLVb4A7+9fK3L07qUFe6T2Pa9bsrqb9a7DGX6hnyEvkZrDg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
Message-Id: <E1x8x3A-00BJ1f-1M@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:44:32 +0000

commit 6a3824e4d6f9f58536ca60249c18f18b4ac1f95b
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 11 15:08:18 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:56:50 2026 +0200

    xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
    
    The comments on the PMINTENSET/PMINTENCLR cases claim that an EL0 access
    may be trapped to EL2 when MDCR_EL2.TPM is set, and that such a case is
    handled. Both are inaccurate. PMINTENSET_EL1/PMINTENCLR_EL1 are accessible
    at EL1 and above only, with no enable making them accessible at EL0.
    
    Arm ARM (DDI 0487M.b) D1.4.5.6 "Prioritization of Synchronous
    exceptions" orders the two exceptions. An access that is never
    accessible at the current Exception level regardless of any enables or
    traps is priority 18, whereas an exception taken to EL2 as the result of
    a configuration control in MDCR_EL2 is priority 24. An EL0 access is
    therefore UNDEFINED and taken to EL1.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    (cherry picked from commit 87a8a5728e5936f088c94bd7960c70f9b1cef36e)
---
 xen/arch/arm/arm64/vsysreg.c | 4 ----
 xen/arch/arm/vcpreg.c        | 1 -
 2 files changed, 5 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index d14258290f..3cc607ebac 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,10 +229,6 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
-        /*
-         * Accessible from EL1 only, but if EL0 trap happens handle as
-         * undef.
-         */
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index e7c484f2c1..2764c072cb 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -294,7 +294,6 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
-        /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:44:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:44:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428428.1651203 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3L-00011p-IJ; Tue, 22 Sep 2026 09:44:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428428.1651203; Tue, 22 Sep 2026 09:44:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3L-00011i-FW; Tue, 22 Sep 2026 09:44:43 +0000
Received: by outflank-mailman (input) for mailman id 1428428;
 Tue, 22 Sep 2026 09:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x3K-00011X-J5
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3K-00AmXP-0i
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3K-00BJr3-1f
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=KDv+CrW8HboSP+vgXvilmjXhN8Eum2u/HMIZcr38r0M=; b=L8WmcWrN/wN5aVDcX2WCCDbUPc
	f2XijkrLbNpntVdRNjQ5/soKRhq2P2aNP8FAeAIfV/fAATDW7x1vcJ+3YWvwFEA+7Yy1bJppsfCBP
	qM3tPZ0mpKt3tkFNo/fehNOOc4xko85ZXnyPDKoCDZIMhjSm04TxCAhn5TB0T0U9nqtY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
Message-Id: <E1x8x3K-00BJr3-1f@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:44:42 +0000

commit 84cc114ffded609ba221082311ded45e3a5e8087
Author:     Hirokazu Takahashi <taka@valinux.co.jp>
AuthorDate: Wed Aug 26 12:55:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:56:50 2026 +0200

    xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
    
    On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled
    causes the domain to probe advanced PMU feature based on system ID
    register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1,
    which causes unhandled register traps and crashes the domain.
    
    To address this issue, implement the following:
    
    - Add emulation for ID_AA64DFR{0,1}_EL1, ID_DFR{0,1}_EL1 and
      ID_DFR{0,1} register accesses for guest domains.
    - Hide PMU registers from a guest domain when its vPMU feature is
      disabled.
    - Proactively make SPE, TRBE, BRBE, Trace Extensions, SPMU, ITE and
      EBEP inaccessible to arm64 guest domains and hide TraceFilt,
      MMapTrc and CopTrc to arm32 guest domains, as they could
      potentially cause similar issues.
    
    Fixes: dbb948110a0e ("xen: Expose the PMU to the guests")
    Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
    Fixes: 3669a1cb9598 ("xen/arm: create a cpuinfo structure for guest")
    Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit b836ef686efe4d01fb54a12cb1e9df7ec0494201)
---
 xen/arch/arm/arm64/vsysreg.c          | 59 ++++++++++++++++++++++++++++++++---
 xen/arch/arm/cpufeature.c             | 18 +++++++++++
 xen/arch/arm/domain.c                 |  2 +-
 xen/arch/arm/include/asm/arm64/hsr.h  |  1 +
 xen/arch/arm/include/asm/cpregs.h     |  1 +
 xen/arch/arm/include/asm/cpufeature.h | 27 +++++++++++-----
 xen/arch/arm/vcpreg.c                 | 34 ++++++++++++++++----
 xen/include/xen/sched.h               |  5 +++
 8 files changed, 129 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index 3cc607ebac..d7d4f14ff7 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,6 +229,7 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
+    case HSR_SYSREG_PMMIR_EL1:
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
@@ -302,8 +303,32 @@ void do_sysreg(struct cpu_user_regs *regs,
     GENERATE_TID3_INFO(ID_PFR0_EL1, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1_EL1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2_EL1, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0_EL1, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1_EL1, dbg32, 1)
+
+    case HSR_SYSREG_ID_DFR0_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_DFR1_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0_EL1, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0_EL1, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1_EL1, mm32, 1)
@@ -344,8 +369,34 @@ void do_sysreg(struct cpu_user_regs *regs,
     }
 
     GENERATE_TID3_INFO(ID_AA64PFR1_EL1, pfr64, 1)
-    GENERATE_TID3_INFO(ID_AA64DFR0_EL1, dbg64, 0)
-    GENERATE_TID3_INFO(ID_AA64DFR1_EL1, dbg64, 1)
+
+    case HSR_SYSREG_ID_AA64DFR0_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg64.pmu_ver = 0;
+            info_dbg64.pmss = 0;
+            info_dbg64.mtpmu = 0;
+            info_dbg64.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_AA64DFR1_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg64.pmicntr = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AA64ISAR0_EL1, isa64, 0)
     GENERATE_TID3_INFO(ID_AA64ISAR1_EL1, isa64, 1)
     GENERATE_TID3_INFO(ID_AA64MMFR0_EL1, mm64, 0)
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 94d14fb6a9..8d8cd19a96 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -219,8 +219,26 @@ static int __init create_domain_cpuinfo(void)
     domain_cpuinfo.isa64.api = 0;
     domain_cpuinfo.isa64.gpa = 0;
     domain_cpuinfo.isa64.gpi = 0;
+
+    /* Hide SPE, DPFZS, TRBE, BRBE, Trace Extensions, SPMU, ITE and EBEP */
+    domain_cpuinfo.dbg64.trace_ver = 0;
+    domain_cpuinfo.dbg64.pms_ver = 0;
+    domain_cpuinfo.dbg64.dpfzs = 0;
+    domain_cpuinfo.dbg64.trace_filt = 0;
+    domain_cpuinfo.dbg64.trace_buffer = 0;
+    domain_cpuinfo.dbg64.ext_trc_buff = 0;
+    domain_cpuinfo.dbg64.brbe = 0;
+    domain_cpuinfo.dbg64.syspmuid = 0;
+    domain_cpuinfo.dbg64.spmu = 0;
+    domain_cpuinfo.dbg64.ite = 0;
+    domain_cpuinfo.dbg64.ebep = 0;
 #endif
 
+    /* Hide Trace Extensions for AArch32 domain */
+    domain_cpuinfo.dbg32.coptrc = 0;
+    domain_cpuinfo.dbg32.mmaptrc = 0;
+    domain_cpuinfo.dbg32.tracefilt = 0;
+
     /* Hide AMU support */
 #ifdef CONFIG_ARM_64
     domain_cpuinfo.pfr64.amu = 0;
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index baa3a5d708..a739dd157e 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -501,7 +501,7 @@ int arch_vcpu_create(struct vcpu *v)
     v->arch.hcr_el2 = get_default_hcr_flags();
 
     v->arch.mdcr_el2 = HDCR_TDRA | HDCR_TDOSA | HDCR_TDA;
-    if ( !(v->domain->options & XEN_DOMCTL_CDF_vpmu) )
+    if ( !is_vpmu_domain(v->domain) )
         v->arch.mdcr_el2 |= HDCR_TPM | HDCR_TPMCR;
 
     if ( (rc = vcpu_vgic_init(v)) != 0 )
diff --git a/xen/arch/arm/include/asm/arm64/hsr.h b/xen/arch/arm/include/asm/arm64/hsr.h
index 1495ccddea..ed18184cc7 100644
--- a/xen/arch/arm/include/asm/arm64/hsr.h
+++ b/xen/arch/arm/include/asm/arm64/hsr.h
@@ -84,6 +84,7 @@
 #define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
 #define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1)
 #define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2)
+#define HSR_SYSREG_PMMIR_EL1      HSR_SYSREG(3,0,c9,c14,6)
 #define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
 #define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
 #define HSR_SYSREG_ICC_SGI1R_EL1  HSR_SYSREG(3,0,c12,c11,5)
diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h
index a7503a190f..3f62b38dc0 100644
--- a/xen/arch/arm/include/asm/cpregs.h
+++ b/xen/arch/arm/include/asm/cpregs.h
@@ -246,6 +246,7 @@
 #define PMINTENSET      p15,0,c9,c14,1  /* Perf. Mon. Interrupt Enable Set Register */
 #define PMINTENCLR      p15,0,c9,c14,2  /* Perf. Mon. Interrupt Enable Clear Register */
 #define PMOVSSET        p15,0,c9,c14,3  /* Perf. Mon. Overflow Flag Status Set register */
+#define PMMIR           p15,0,c9,c14,6  /* Perf. Mon. Machine Identification Register */
 
 /* CP15 CR10: */
 #define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index bf902a3970..c554686415 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -208,7 +208,7 @@ struct cpuinfo_arm {
         };
     } pfr64;
 
-    union {
+    union cpuinfo_dbg64 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -216,19 +216,31 @@ struct cpuinfo_arm {
             unsigned long trace_ver:4;
             unsigned long pmu_ver:4;
             unsigned long brps:4;
-            unsigned long __res0:4;
+            unsigned long pmss:4;
             unsigned long wrps:4;
             unsigned long __res1:4;
             unsigned long ctx_cmps:4;
             unsigned long pms_ver:4;
             unsigned long double_lock:4;
             unsigned long trace_filt:4;
-            unsigned long __res2:4;
+            unsigned long trace_buffer:4;
             unsigned long mtpmu:4;
-            unsigned long __res3:12;
+            unsigned long brbe:4;
+            unsigned long ext_trc_buff:4;
+            unsigned long hpmn0:4;
 
             /* DFR1 */
-            unsigned long __res4:64;
+            unsigned long syspmuid:8;
+            unsigned long brps1:8;
+            unsigned long wrps1:8;
+            unsigned long ctx_cmps1:8;
+            unsigned long spmu:4;
+            unsigned long pmicntr:4;
+            unsigned long able:4;
+            unsigned long ite:4;
+            unsigned long ebep:4;
+            unsigned long dpfzs:4;
+            unsigned long abl_cmps:8;
         };
     } dbg64;
 
@@ -408,7 +420,7 @@ struct cpuinfo_arm {
         };
     } pfr32;
 
-    union {
+    union cpuinfo_dbg32 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -426,7 +438,8 @@ struct cpuinfo_arm {
 
             /* DFR1 */
             unsigned long mtpmu:4;
-            unsigned long __res1:28;
+            unsigned long hpmn0:4;
+            unsigned long __res1:24;
 #ifdef CONFIG_ARM_64
             unsigned long __res2:32;
 #endif
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 2764c072cb..99ac8db233 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -278,10 +278,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
      *
      * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR.
      */
-    /* We could trap ID_DFR0 and tell the guest we don't support
-     * performance monitoring, but Linux doesn't check the ID_DFR0.
-     * Therefore it will read PMCR.
-     *
+    /*
      * We tell the guest we have 0 counters. Unfortunately we must
      * always support PMCCNTR (the cyle counter): we just RAZ/WI for all
      * PM register, which doesn't crash the kernel at least
@@ -294,6 +291,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
+    case HSR_CPREG32(PMMIR):
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
@@ -322,8 +320,32 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
     GENERATE_TID3_INFO(ID_PFR0, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1, dbg32, 1)
+
+    case HSR_CPREG32(ID_DFR0):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_CPREG32(ID_DFR1):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1, mm32, 1)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 91f6db7a32..df9a8b2ae4 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -1252,6 +1252,11 @@ static always_inline bool is_iommu_enabled(const struct domain *d)
     return evaluate_nospec(d->options & XEN_DOMCTL_CDF_iommu);
 }
 
+static inline bool is_vpmu_domain(const struct domain *d)
+{
+    return d->options & XEN_DOMCTL_CDF_vpmu;
+}
+
 #ifdef CONFIG_MEM_PAGING
 # define mem_paging_enabled(d) vm_event_check_ring((d)->vm_event_paging)
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:44:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:44:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428429.1651207 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3V-00014T-K2; Tue, 22 Sep 2026 09:44:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428429.1651207; Tue, 22 Sep 2026 09:44:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3V-00014L-H7; Tue, 22 Sep 2026 09:44:53 +0000
Received: by outflank-mailman (input) for mailman id 1428429;
 Tue, 22 Sep 2026 09:44:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x3U-00014B-LG
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:44:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3U-00AmXr-10
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3U-00BKmD-1x
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:44:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=irc9GcquaEdznlMkC9lUetw/cHlT0LcdF5eVGsytsJ4=; b=HVsKTEy3Wf+NbbV86G7jaQZFxW
	TuP32JEglW4lc0Ja2woPlXQZBiqQX6da3iCtFGOl6nGdcgDnRNJfptkOfxHhkv8SVH43mWxIX2tYR
	z7yzgXNECT+zDe0cdeiyn4gMNQ49AFx8x3vqu1j3s4pDh7PT7+eCxq8uPGPLKs6k4J6c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: traps: report level 0 faults in panic_PAR()
Message-Id: <E1x8x3U-00BKmD-1x@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:44:52 +0000

commit 3375d22835694cf5b6c3da534e64e7669e376390
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 25 08:23:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:57:05 2026 +0200

    xen/arm: traps: report level 0 faults in panic_PAR()
    
    decode_fsc() derives the fault level from the low two bits of the FSC, so
    level 0 is a valid output: FSC_FLT_TRANS is 0x04, i.e. "translation fault,
    level 0 or translation table base register".
    
    This is reachable on arm64 because xen_pgtable is the zeroeth-level root,
    but fsc_level_str() has no case for it and prints " (level invalid)"
    instead. At the time the function was created Xen used only three levels.
    
    Add the missing case. On arm32 the zeroeth level does not exist but FSC
    0 denotes address size fault at translation table base register.
    
    While at it, make decode_fsc() decode also address size faults.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    (cherry picked from commit 4e1f58ea1a20d8a831ad72aa30eafa618dfae750)
---
 xen/arch/arm/include/asm/processor.h | 2 ++
 xen/arch/arm/traps.c                 | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
index a3753c317f..509040a1cd 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -521,6 +521,7 @@ extern register_t __cpu_logical_map[];
 /*
  * 543210 BIT
  * 00XXLL -- XX Fault Level LL
+ * ..00LL -- Address Size Fault LL
  * ..01LL -- Translation Fault LL
  * ..10LL -- Access Fault LL
  * ..11LL -- Permission Fault LL
@@ -534,6 +535,7 @@ extern register_t __cpu_logical_map[];
 #define FSC_TYPE_OTH   (_AC(0x02,U)<<4)
 #define FSC_TYPE_IMPL  (_AC(0x03,U)<<4)
 
+#define FSC_FLT_ADDR_SIZE (0x00)
 #define FSC_FLT_TRANS  (0x04)
 #define FSC_FLT_ACCESS (0x08)
 #define FSC_FLT_PERM   (0x0c)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 0c01f37ad6..344aa21b98 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -307,6 +307,10 @@ static const char *decode_fsc(uint32_t fsc, int *level)
 
     switch ( fsc & 0x3f )
     {
+    case FSC_FLT_ADDR_SIZE ... FSC_FLT_ADDR_SIZE + 3:
+        msg = "Address size fault";
+        *level = fsc & FSC_LL_MASK;
+        break;
     case FSC_FLT_TRANS ... FSC_FLT_TRANS + 3:
         msg = "Translation fault";
         *level = fsc & FSC_LL_MASK;
@@ -363,6 +367,7 @@ static const char *fsc_level_str(int level)
     switch ( level )
     {
     case -1: return "";
+    case 0:  return " at level 0 or TTBR";
     case 1:  return " at level 1";
     case 2:  return " at level 2";
     case 3:  return " at level 3";
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:45:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:45:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428430.1651212 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3f-00018t-NU; Tue, 22 Sep 2026 09:45:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428430.1651212; Tue, 22 Sep 2026 09:45:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3f-00018l-Kc; Tue, 22 Sep 2026 09:45:03 +0000
Received: by outflank-mailman (input) for mailman id 1428430;
 Tue, 22 Sep 2026 09:45:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x3e-00018a-OA
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:45:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3e-00AmZ0-1G
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3e-00BLZ7-2D
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Qvp5jCJPFqMqAIEPoZYR3E8V5tVCWl7CDlsGc8bnYCw=; b=Cln0JApeWqXMblxvs7wb5HMQPG
	HWWYC+FejUqCeyH4Cn8JPOHi9pgS4IRD9yJv8A1qWG59vY6MIJO8ix7s4wM38kyckWwe8qyUXULNg
	z0rYVvMgw+ey5Zu59rkP+7kynkFxYkbzbsdhKOiOe3XSOFJ+O38r+4+TojrGLG6i0YFM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: Fix evaluation of parameters for SMCCC calls
Message-Id: <E1x8x3e-00BLZ7-2D@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:45:02 +0000

commit 781b60f951402ba138e60be3f1e2c5e97d9a63ab
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:35 2026 +0100
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:57:05 2026 +0200

    xen/arm: Fix evaluation of parameters for SMCCC calls
    
    Contrary to what was claimed in commit 67bcf5eae709 ("xen/arm: Simplify type
    handling for SMCCC declarations"), there is an important reason to retain the
    intermediate variable.  It is unsafe to have any logic between the assignment
    of the register variables and the asm() block they're used in.
    
    This logically reverts commit 67bcf5eae709 ("xen/arm: Simplify type handling
    for SMCCC declarations") while retaining the conversions from commit
    7f15d5d13221 ("xen/treewide: More typeof() -> auto conversions").
    
    Adjust __declare_arg_0() to match.  It happens to be safe because it's the
    first register expression once all macros are expanded, but it really should
    be consistent with the others.
    
    Leave a comment explaining why they must be written like this.
    
    Fixes: 67bcf5eae709 ("xen/arm: Simplify type handling for SMCCC declarations")
    Reported-by: Jan Setje-Eilers <Jan.SetjeEilers@oracle.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
    (cherry picked from commit 95302b39430c9d2d4b50c2c63f56629e543b29e6)
---
 xen/arch/arm/include/asm/smccc.h | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 62c6985e73..53cdddb690 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -108,37 +108,52 @@ struct arm_smccc_res {
 #define __constraint_read_6 __constraint_read_5, "r" (arg6)
 #define __constraint_read_7 __constraint_read_6, "r" (arg7)
 
+/*
+ * Macro arguments MUST be evaluated before being assigned to a register
+ * variable.
+ *
+ * This is manual register scheduling for the asm() statement, and any other
+ * logic to evaluate may clobber the already-scheduled registers.
+ */
 #define __declare_arg_0(a0, res)                            \
+    auto __a0 = (uint32_t)(a0);                             \
     struct arm_smccc_res    *___res = (res);                \
-    register unsigned long  arg0 ASM_REG(0) = (uint32_t)(a0)
+    register unsigned long  arg0 ASM_REG(0) = __a0
 
 #define __declare_arg_1(a0, a1, res)                        \
+    auto __a1 = (a1);                                       \
     __declare_arg_0(a0, res);                               \
-    register auto           arg1 ASM_REG(1) = (a1)
+    register auto           arg1 ASM_REG(1) = __a1
 
 #define __declare_arg_2(a0, a1, a2, res)                    \
+    auto __a2 = (a2);                                       \
     __declare_arg_1(a0, a1, res);                           \
-    register auto           arg2 ASM_REG(2) = (a2)
+    register auto           arg2 ASM_REG(2) = __a2
 
 #define __declare_arg_3(a0, a1, a2, a3, res)                \
+    auto __a3 = (a3);                                       \
     __declare_arg_2(a0, a1, a2, res);                       \
-    register auto           arg3 ASM_REG(3) = (a3)
+    register auto           arg3 ASM_REG(3) = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
+    auto __a4 = (a4);                                   \
     __declare_arg_3(a0, a1, a2, a3, res);               \
-    register auto           arg4 ASM_REG(4) = (a4)
+    register auto           arg4 ASM_REG(4) = __a4
 
 #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)    \
+    auto __a5 = (a5);                                   \
     __declare_arg_4(a0, a1, a2, a3, a4, res);           \
-    register auto           arg5 ASM_REG(5) = (a5)
+    register auto           arg5 ASM_REG(5) = __a5
 
 #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)    \
+    auto __a6 = (a6);                                       \
     __declare_arg_5(a0, a1, a2, a3, a4, a5, res);           \
-    register auto           arg6 ASM_REG(6) = (a6)
+    register auto           arg6 ASM_REG(6) = __a6
 
 #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)    \
+    auto __a7 = (a7);                                           \
     __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);           \
-    register auto           arg7 ASM_REG(7) = (a7)
+    register auto           arg7 ASM_REG(7) = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:45:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:45:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428431.1651215 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3p-0001BC-Oe; Tue, 22 Sep 2026 09:45:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428431.1651215; Tue, 22 Sep 2026 09:45:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x3p-0001B4-Ly; Tue, 22 Sep 2026 09:45:13 +0000
Received: by outflank-mailman (input) for mailman id 1428431;
 Tue, 22 Sep 2026 09:45:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x3o-0001Aw-Qz
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:45:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3o-00AmZQ-1W
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3o-00BMKo-2U
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Kq5uCTlWoYtqKjhyF2vE7s2auO4unaykxFFiI8qB35E=; b=MPmL8wb66uOEQ2DoBDGmtHYWNE
	KAA7SY999yUS7Qg7pwM/ceaExOO0ESRFdDmS9NF/hLpm6qTKflkU2usgySefM+o0oTNWZbwjFrBTE
	aaSmH+NEGcJpMFVyMgVVfBocsj4wDrUYip/T2cDkFVwkp8zV4aAVNP8KOFLZwFD4+Ezo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.22] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x8x3o-00BMKo-2U@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:45:12 +0000

commit 3ffc21956e44ca6ed48c18b7daeecaf9ec6c837d
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:57:05 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681)
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:45:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:45:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428432.1651218 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x40-0001Dd-Pu; Tue, 22 Sep 2026 09:45:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428432.1651218; Tue, 22 Sep 2026 09:45:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x40-0001DV-NK; Tue, 22 Sep 2026 09:45:24 +0000
Received: by outflank-mailman (input) for mailman id 1428432;
 Tue, 22 Sep 2026 09:45:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x3z-0001DJ-9y
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:45:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3y-00AmZt-34
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x3z-00BNBx-0n
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eBe1YS4fxzf/Yol0tTofnjpNaFIVR+6u8IeTlKoj+9w=; b=eAg/wKbCpjHRZfgCbEX4WFDBZe
	1MHp20+VTnhs6KBABcVQ2w2OhqLn7hmrS5s3FGc1NTBgSTxVjp06Le3bL7GknUP5IBuDWAst2qPFJ
	Zmj1NiyngMOcjDA0Wy+1V1Rn5aHgIHBP3BWx3wQytlzJbRKZZmY0baX/T7xYGGuCgqnQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/arm: mask debug exceptions in initial AArch64 guest state
Message-Id: <E1x8x3z-00BNBx-0n@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:45:23 +0000

commit 353665b48b7aefb88c06ddf344ebcd229d2642c0
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Fri Jun 19 20:37:38 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: mask debug exceptions in initial AArch64 guest state
    
    PSR_GUEST64_INIT currently masks SError, IRQ and FIQ, but leaves debug
    exceptions unmasked. Both the AArch64 Linux boot protocol and PSCI entry
    requirements expect PSTATE.DAIF to be masked.
    
    Add PSR_DBG_MASK to PSR_GUEST64_INIT. This fixes the initial AArch64 guest
    entry state as well as virtual PSCI CPU_ON and SYSTEM_SUSPEND resume entry.
    
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    (cherry picked from commit ad8663a75aa8db4255d6690bfc210d559edc9f5b)
---
 xen/include/public/arch-arm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index b31324f8d4..34e20f5471 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -413,7 +413,8 @@ typedef uint64_t xen_callback_t;
  * zImage kernels on aarch32.
  */
 #define PSR_GUEST32_INIT (PSR_Z|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+#define PSR_GUEST64_INIT \
+    (PSR_DBG_MASK|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
 
 #define SCTLR_GUEST_INIT    xen_mk_ullong(0x00c50078)
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:45:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:45:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428433.1651224 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4A-0001Fv-RR; Tue, 22 Sep 2026 09:45:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428433.1651224; Tue, 22 Sep 2026 09:45:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4A-0001Fl-Of; Tue, 22 Sep 2026 09:45:34 +0000
Received: by outflank-mailman (input) for mailman id 1428433;
 Tue, 22 Sep 2026 09:45:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x49-0001Fb-Cx
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:45:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x49-00AmaL-07
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x49-00BOBz-13
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=6JbJQoHfVyEIw9oMruHzqLqeX0vGrI+j1YIPvzSPveM=; b=1k/Ev5LYUGUSQzoxhZPstig5Tl
	Cwq/AnEUvLJWJhCrf5paPnwE4DWOeF1CsL9yBUmWM04uyKDJrviX+7dV3jySPPE0jjtiGMdx3Vtqj
	R2uujr/TI6mBw74BQUGGRWED5JnVVl6oliJLQShVp9VjHWVJ2hDT5Y0DKMH1SvnuNqO0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
Message-Id: <E1x8x49-00BOBz-13@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:45:33 +0000

commit d4fa0a7a037b4648e779506ab1e44b6c73886ef7
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Aug 5 14:11:24 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
    
    process_domain_node() parses "xen,static-mem" regardless of
    CONFIG_STATIC_MEMORY. With the feature off, init_staticmem_pages() is a
    no-op stub, so boot carries on until construct_domU() reaches the
    ASSERT_UNREACHABLE() stubs of allocate_static_memory() /
    assign_static_memory_11(): a debug build trips the assertion, a production
    build gives the domain no memory at all.
    
    Bail out at parse time instead, like process_shm_node() already does for
    CONFIG_STATIC_SHM.
    
    Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
    (cherry picked from commit e888192d133eeec8a94275eaf4194117f198a7e2)
---
 xen/common/device-tree/bootinfo-fdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/common/device-tree/bootinfo-fdt.c b/xen/common/device-tree/bootinfo-fdt.c
index 272b5a6c0a..ca64daf4cd 100644
--- a/xen/common/device-tree/bootinfo-fdt.c
+++ b/xen/common/device-tree/bootinfo-fdt.c
@@ -349,6 +349,12 @@ static int __init process_domain_node(const void *fdt, int node,
         /* No "xen,static-mem" present. */
         return 0;
 
+    if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
+    {
+        printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n");
+        return -EINVAL;
+    }
+
     return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells,
                                    size_cells, bootinfo_get_reserved_mem(),
                                    MEMBANK_STATIC_DOMAIN);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:45:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:45:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428434.1651227 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4K-0001IK-SV; Tue, 22 Sep 2026 09:45:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428434.1651227; Tue, 22 Sep 2026 09:45:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4K-0001IC-Q1; Tue, 22 Sep 2026 09:45:44 +0000
Received: by outflank-mailman (input) for mailman id 1428434;
 Tue, 22 Sep 2026 09:45:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x4J-0001I1-FR
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:45:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4J-00Amar-0P
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4J-00BP2D-1N
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/6rm2H26f+12QB6O9QDKICtma3R0rZxOefiT+M5rhjs=; b=PGwCC6AKvQnTu4bsyCEprmO5kj
	F2FRDsf/MV0oTkUyzIe6S3EGKal0juyqUmjKagWszdcmczmopAdlet2ytnXwSp8FHr/gXS4wpdyO9
	W2JTyetF+SbVsAoZyUlI2j44at3rI9Kj7Ht82yU6QG853B4wh8JpI8WcytDJTntjKHIA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/arm: propagate secondary GIC initialization failures
Message-Id: <E1x8x4J-00BP2D-1N@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:45:43 +0000

commit 86edcfb3248d60e5ebd14a9f3cf88c3b205edbaa
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Mon Aug 10 22:41:46 2026 +0300
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: propagate secondary GIC initialization failures
    
    The GICv3 secondary_init() callback can fail while discovering or
    waking a Redistributor, enabling LPIs, or setting up an ITS collection.
    gic_init_secondary_cpu() currently discards that status. start_secondary()
    then marks the CPU online even though its per-CPU GIC interface may be
    unusable.
    
    Return the callback status through the common GIC layer. Have
    start_secondary() report the failure and stop the affected CPU before it
    updates system features or is added to cpu_online_map.
    
    Fixes: bc183a0235e0 ("xen/arm: Add support for GIC v3")
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit 0102b592f46ff3f0784e693efa0b812551345271)
---
 xen/arch/arm/gic.c             | 10 ++++++++--
 xen/arch/arm/include/asm/gic.h |  2 +-
 xen/arch/arm/smpboot.c         | 11 +++++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 260ee64cca..365855769c 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -282,11 +282,17 @@ void smp_send_state_dump(unsigned int cpu)
 }
 
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
-void gic_init_secondary_cpu(void)
+int gic_init_secondary_cpu(void)
 {
-    gic_hw_ops->secondary_init();
+    int rc = gic_hw_ops->secondary_init();
+
+    if ( rc )
+        return rc;
+
     /* Clear LR mask for secondary cpus */
     clear_cpu_lr_mask();
+
+    return 0;
 }
 
 /* Shut down the per-CPU GIC interface */
diff --git a/xen/arch/arm/include/asm/gic.h b/xen/arch/arm/include/asm/gic.h
index 8ea256ecc6..992eb590dd 100644
--- a/xen/arch/arm/include/asm/gic.h
+++ b/xen/arch/arm/include/asm/gic.h
@@ -291,7 +291,7 @@ extern void gic_preinit(void);
 /* Bring up the interrupt controller, and report # cpus attached */
 extern void gic_init(void);
 /* Bring up a secondary CPU's per-CPU GIC interface */
-extern void gic_init_secondary_cpu(void);
+extern int gic_init_secondary_cpu(void);
 /* Take down a CPU's per-CPU GIC interface */
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index ba5fd2dd52..1806c47a08 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -319,6 +319,7 @@ smp_prepare_cpus(void)
 void asmlinkage noreturn start_secondary(void)
 {
     unsigned int cpuid = init_data.cpuid;
+    int rc;
 
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
@@ -366,6 +367,14 @@ void asmlinkage noreturn start_secondary(void)
         stop_cpu();
     }
 
+    rc = gic_init_secondary_cpu();
+    if ( rc )
+    {
+        printk(XENLOG_ERR "CPU%u: Failed to initialize the GIC: %d\n",
+               smp_processor_id(), rc);
+        stop_cpu();
+    }
+
     /*
      * system features must be updated only if we do not stop the core or
      * we might disable features due to a non used core (for example when
@@ -373,8 +382,6 @@ void asmlinkage noreturn start_secondary(void)
      */
     update_system_features(&current_cpu_data);
 
-    gic_init_secondary_cpu();
-
     set_current(idle_vcpu[cpuid]);
 
     /* Run local notifiers */
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:45:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:45:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428435.1651231 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4U-0001Ku-Tt; Tue, 22 Sep 2026 09:45:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428435.1651231; Tue, 22 Sep 2026 09:45:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4U-0001Km-RK; Tue, 22 Sep 2026 09:45:54 +0000
Received: by outflank-mailman (input) for mailman id 1428435;
 Tue, 22 Sep 2026 09:45:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x4T-0001Kc-I4
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:45:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4T-00AmbM-0f
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4T-00BPvp-1d
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:45:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=DWKD3aTVbLNW09MhWU1n4xyx+8Go6xPIpC3mwVc1rPI=; b=b4RTfubzdNKQImPmFWyLidBBOZ
	7zyuYXvo2ZvWIAfufIXtcoRBiWgo98UBGLp44ZaKjR9ld3OKM6HXJspJzyBmXjDpPwFgvdX7k4oNU
	EX1LUY7+50ETFuOdhXa37AyQqD2xwmzkxbcNznnzczulRbnCgCrGcxfj5B2oiXMOkZmg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
Message-Id: <E1x8x4T-00BPvp-1d@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:45:53 +0000

commit 4861c790b9c5cfe305f519fb68d0079205fed03a
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 11 15:08:18 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
    
    The comments on the PMINTENSET/PMINTENCLR cases claim that an EL0 access
    may be trapped to EL2 when MDCR_EL2.TPM is set, and that such a case is
    handled. Both are inaccurate. PMINTENSET_EL1/PMINTENCLR_EL1 are accessible
    at EL1 and above only, with no enable making them accessible at EL0.
    
    Arm ARM (DDI 0487M.b) D1.4.5.6 "Prioritization of Synchronous
    exceptions" orders the two exceptions. An access that is never
    accessible at the current Exception level regardless of any enables or
    traps is priority 18, whereas an exception taken to EL2 as the result of
    a configuration control in MDCR_EL2 is priority 24. An EL0 access is
    therefore UNDEFINED and taken to EL1.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    (cherry picked from commit 87a8a5728e5936f088c94bd7960c70f9b1cef36e)
---
 xen/arch/arm/arm64/vsysreg.c | 4 ----
 xen/arch/arm/vcpreg.c        | 1 -
 2 files changed, 5 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index d14258290f..3cc607ebac 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,10 +229,6 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
-        /*
-         * Accessible from EL1 only, but if EL0 trap happens handle as
-         * undef.
-         */
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index e7c484f2c1..2764c072cb 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -294,7 +294,6 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
-        /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:46:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:46:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428436.1651234 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4e-0001NN-VX; Tue, 22 Sep 2026 09:46:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428436.1651234; Tue, 22 Sep 2026 09:46:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4e-0001NF-Si; Tue, 22 Sep 2026 09:46:04 +0000
Received: by outflank-mailman (input) for mailman id 1428436;
 Tue, 22 Sep 2026 09:46:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x4d-0001N6-L6
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:46:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4d-00AmcG-0y
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4d-00BQsQ-1v
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=LvLXofqQqjwqC/d10OP0HGCszjprFwV6hTCFNo5/G84=; b=aqtBLkcTf6ccVOcmCtXRyk5TuZ
	ZI2m+i8+GYsBEYGHvM/JPA82ald0f9dlpr/Hgpa7blsoEcDl+VTIk/sVlerRIrfQQq9LH82K1STIp
	RU0Y+g0gGuFmg1r9aJq2qiyI3qf6lF39zvGJqiHefru/CjfHFd8NiIUCW/QkZ8hEaSrA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
Message-Id: <E1x8x4d-00BQsQ-1v@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:46:03 +0000

commit d057acfd4352315ee26750bad25bc349bb7d6157
Author:     Hirokazu Takahashi <taka@valinux.co.jp>
AuthorDate: Wed Aug 26 12:55:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
    
    On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled
    causes the domain to probe advanced PMU feature based on system ID
    register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1,
    which causes unhandled register traps and crashes the domain.
    
    To address this issue, implement the following:
    
    - Add emulation for ID_AA64DFR{0,1}_EL1, ID_DFR{0,1}_EL1 and
      ID_DFR{0,1} register accesses for guest domains.
    - Hide PMU registers from a guest domain when its vPMU feature is
      disabled.
    - Proactively make SPE, TRBE, BRBE, Trace Extensions, SPMU, ITE and
      EBEP inaccessible to arm64 guest domains and hide TraceFilt,
      MMapTrc and CopTrc to arm32 guest domains, as they could
      potentially cause similar issues.
    
    Fixes: dbb948110a0e ("xen: Expose the PMU to the guests")
    Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
    Fixes: 3669a1cb9598 ("xen/arm: create a cpuinfo structure for guest")
    Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit b836ef686efe4d01fb54a12cb1e9df7ec0494201)
---
 xen/arch/arm/arm64/vsysreg.c          | 59 ++++++++++++++++++++++++++++++++---
 xen/arch/arm/cpufeature.c             | 18 +++++++++++
 xen/arch/arm/domain.c                 |  2 +-
 xen/arch/arm/include/asm/arm64/hsr.h  |  1 +
 xen/arch/arm/include/asm/cpregs.h     |  1 +
 xen/arch/arm/include/asm/cpufeature.h | 27 +++++++++++-----
 xen/arch/arm/vcpreg.c                 | 34 ++++++++++++++++----
 xen/include/xen/sched.h               |  5 +++
 8 files changed, 129 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index 3cc607ebac..d7d4f14ff7 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,6 +229,7 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
+    case HSR_SYSREG_PMMIR_EL1:
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
@@ -302,8 +303,32 @@ void do_sysreg(struct cpu_user_regs *regs,
     GENERATE_TID3_INFO(ID_PFR0_EL1, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1_EL1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2_EL1, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0_EL1, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1_EL1, dbg32, 1)
+
+    case HSR_SYSREG_ID_DFR0_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_DFR1_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0_EL1, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0_EL1, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1_EL1, mm32, 1)
@@ -344,8 +369,34 @@ void do_sysreg(struct cpu_user_regs *regs,
     }
 
     GENERATE_TID3_INFO(ID_AA64PFR1_EL1, pfr64, 1)
-    GENERATE_TID3_INFO(ID_AA64DFR0_EL1, dbg64, 0)
-    GENERATE_TID3_INFO(ID_AA64DFR1_EL1, dbg64, 1)
+
+    case HSR_SYSREG_ID_AA64DFR0_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg64.pmu_ver = 0;
+            info_dbg64.pmss = 0;
+            info_dbg64.mtpmu = 0;
+            info_dbg64.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_AA64DFR1_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg64.pmicntr = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AA64ISAR0_EL1, isa64, 0)
     GENERATE_TID3_INFO(ID_AA64ISAR1_EL1, isa64, 1)
     GENERATE_TID3_INFO(ID_AA64MMFR0_EL1, mm64, 0)
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 94d14fb6a9..8d8cd19a96 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -219,8 +219,26 @@ static int __init create_domain_cpuinfo(void)
     domain_cpuinfo.isa64.api = 0;
     domain_cpuinfo.isa64.gpa = 0;
     domain_cpuinfo.isa64.gpi = 0;
+
+    /* Hide SPE, DPFZS, TRBE, BRBE, Trace Extensions, SPMU, ITE and EBEP */
+    domain_cpuinfo.dbg64.trace_ver = 0;
+    domain_cpuinfo.dbg64.pms_ver = 0;
+    domain_cpuinfo.dbg64.dpfzs = 0;
+    domain_cpuinfo.dbg64.trace_filt = 0;
+    domain_cpuinfo.dbg64.trace_buffer = 0;
+    domain_cpuinfo.dbg64.ext_trc_buff = 0;
+    domain_cpuinfo.dbg64.brbe = 0;
+    domain_cpuinfo.dbg64.syspmuid = 0;
+    domain_cpuinfo.dbg64.spmu = 0;
+    domain_cpuinfo.dbg64.ite = 0;
+    domain_cpuinfo.dbg64.ebep = 0;
 #endif
 
+    /* Hide Trace Extensions for AArch32 domain */
+    domain_cpuinfo.dbg32.coptrc = 0;
+    domain_cpuinfo.dbg32.mmaptrc = 0;
+    domain_cpuinfo.dbg32.tracefilt = 0;
+
     /* Hide AMU support */
 #ifdef CONFIG_ARM_64
     domain_cpuinfo.pfr64.amu = 0;
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 38d7768de9..81720ed467 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -559,7 +559,7 @@ int arch_vcpu_create(struct vcpu *v)
     v->arch.hcr_el2 = get_default_hcr_flags();
 
     v->arch.mdcr_el2 = HDCR_TDRA | HDCR_TDOSA | HDCR_TDA;
-    if ( !(v->domain->options & XEN_DOMCTL_CDF_vpmu) )
+    if ( !is_vpmu_domain(v->domain) )
         v->arch.mdcr_el2 |= HDCR_TPM | HDCR_TPMCR;
 
     if ( (rc = vcpu_vgic_init(v)) != 0 )
diff --git a/xen/arch/arm/include/asm/arm64/hsr.h b/xen/arch/arm/include/asm/arm64/hsr.h
index 1495ccddea..ed18184cc7 100644
--- a/xen/arch/arm/include/asm/arm64/hsr.h
+++ b/xen/arch/arm/include/asm/arm64/hsr.h
@@ -84,6 +84,7 @@
 #define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
 #define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1)
 #define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2)
+#define HSR_SYSREG_PMMIR_EL1      HSR_SYSREG(3,0,c9,c14,6)
 #define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
 #define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
 #define HSR_SYSREG_ICC_SGI1R_EL1  HSR_SYSREG(3,0,c12,c11,5)
diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h
index a7503a190f..3f62b38dc0 100644
--- a/xen/arch/arm/include/asm/cpregs.h
+++ b/xen/arch/arm/include/asm/cpregs.h
@@ -246,6 +246,7 @@
 #define PMINTENSET      p15,0,c9,c14,1  /* Perf. Mon. Interrupt Enable Set Register */
 #define PMINTENCLR      p15,0,c9,c14,2  /* Perf. Mon. Interrupt Enable Clear Register */
 #define PMOVSSET        p15,0,c9,c14,3  /* Perf. Mon. Overflow Flag Status Set register */
+#define PMMIR           p15,0,c9,c14,6  /* Perf. Mon. Machine Identification Register */
 
 /* CP15 CR10: */
 #define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index b6df188011..63f6cb4412 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -208,7 +208,7 @@ struct cpuinfo_arm {
         };
     } pfr64;
 
-    union {
+    union cpuinfo_dbg64 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -216,19 +216,31 @@ struct cpuinfo_arm {
             unsigned long trace_ver:4;
             unsigned long pmu_ver:4;
             unsigned long brps:4;
-            unsigned long __res0:4;
+            unsigned long pmss:4;
             unsigned long wrps:4;
             unsigned long __res1:4;
             unsigned long ctx_cmps:4;
             unsigned long pms_ver:4;
             unsigned long double_lock:4;
             unsigned long trace_filt:4;
-            unsigned long __res2:4;
+            unsigned long trace_buffer:4;
             unsigned long mtpmu:4;
-            unsigned long __res3:12;
+            unsigned long brbe:4;
+            unsigned long ext_trc_buff:4;
+            unsigned long hpmn0:4;
 
             /* DFR1 */
-            unsigned long __res4:64;
+            unsigned long syspmuid:8;
+            unsigned long brps1:8;
+            unsigned long wrps1:8;
+            unsigned long ctx_cmps1:8;
+            unsigned long spmu:4;
+            unsigned long pmicntr:4;
+            unsigned long able:4;
+            unsigned long ite:4;
+            unsigned long ebep:4;
+            unsigned long dpfzs:4;
+            unsigned long abl_cmps:8;
         };
     } dbg64;
 
@@ -401,7 +413,7 @@ struct cpuinfo_arm {
         };
     } pfr32;
 
-    union {
+    union cpuinfo_dbg32 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -419,7 +431,8 @@ struct cpuinfo_arm {
 
             /* DFR1 */
             unsigned long mtpmu:4;
-            unsigned long __res1:28;
+            unsigned long hpmn0:4;
+            unsigned long __res1:24;
 #ifdef CONFIG_ARM_64
             unsigned long __res2:32;
 #endif
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 2764c072cb..99ac8db233 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -278,10 +278,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
      *
      * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR.
      */
-    /* We could trap ID_DFR0 and tell the guest we don't support
-     * performance monitoring, but Linux doesn't check the ID_DFR0.
-     * Therefore it will read PMCR.
-     *
+    /*
      * We tell the guest we have 0 counters. Unfortunately we must
      * always support PMCCNTR (the cyle counter): we just RAZ/WI for all
      * PM register, which doesn't crash the kernel at least
@@ -294,6 +291,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
+    case HSR_CPREG32(PMMIR):
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
@@ -322,8 +320,32 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
     GENERATE_TID3_INFO(ID_PFR0, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1, dbg32, 1)
+
+    case HSR_CPREG32(ID_DFR0):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_CPREG32(ID_DFR1):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1, mm32, 1)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index f42fcaf20e..5d97f89a6d 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -1240,6 +1240,11 @@ static always_inline bool is_iommu_enabled(const struct domain *d)
     return evaluate_nospec(d->options & XEN_DOMCTL_CDF_iommu);
 }
 
+static inline bool is_vpmu_domain(const struct domain *d)
+{
+    return d->options & XEN_DOMCTL_CDF_vpmu;
+}
+
 #ifdef CONFIG_MEM_PAGING
 # define mem_paging_enabled(d) vm_event_check_ring((d)->vm_event_paging)
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:46:15 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:46:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428437.1651238 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4p-0001Q7-25; Tue, 22 Sep 2026 09:46:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428437.1651238; Tue, 22 Sep 2026 09:46:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4o-0001Pz-Vd; Tue, 22 Sep 2026 09:46:14 +0000
Received: by outflank-mailman (input) for mailman id 1428437;
 Tue, 22 Sep 2026 09:46:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x4n-0001Pq-OJ
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:46:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4n-00Amcn-1E
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4n-00BRi2-2C
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Iq+OpC24dBWNJrCswT6ZQ2M2HXUgtL8XQij1ULvVMB0=; b=Ct+Pn8GY9cqt+bMSby5+GXCsNX
	ANjJpxax2qFv7QYNjiZdapeQ/m7r44S1RHIj1Xewup1TZf8b+zeYIQB9wf2y6xL/u9Y/hlgoude8p
	Q0IEZeb9EwsbJlgb1yWazIdppDYVGHbhYlr+zTaNPlLmP5nFRIMU4GA7cEHSdaPbGqF0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/arm: traps: report level 0 faults in panic_PAR()
Message-Id: <E1x8x4n-00BRi2-2C@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:46:13 +0000

commit 2f5ea398f7d308ee43fae31382844ac5098b5858
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 25 08:23:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: traps: report level 0 faults in panic_PAR()
    
    decode_fsc() derives the fault level from the low two bits of the FSC, so
    level 0 is a valid output: FSC_FLT_TRANS is 0x04, i.e. "translation fault,
    level 0 or translation table base register".
    
    This is reachable on arm64 because xen_pgtable is the zeroeth-level root,
    but fsc_level_str() has no case for it and prints " (level invalid)"
    instead. At the time the function was created Xen used only three levels.
    
    Add the missing case. On arm32 the zeroeth level does not exist but FSC
    0 denotes address size fault at translation table base register.
    
    While at it, make decode_fsc() decode also address size faults.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    (cherry picked from commit 4e1f58ea1a20d8a831ad72aa30eafa618dfae750)
---
 xen/arch/arm/include/asm/processor.h | 2 ++
 xen/arch/arm/traps.c                 | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
index 25c5762c67..59b971c84a 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -513,6 +513,7 @@ extern register_t __cpu_logical_map[];
 /*
  * 543210 BIT
  * 00XXLL -- XX Fault Level LL
+ * ..00LL -- Address Size Fault LL
  * ..01LL -- Translation Fault LL
  * ..10LL -- Access Fault LL
  * ..11LL -- Permission Fault LL
@@ -526,6 +527,7 @@ extern register_t __cpu_logical_map[];
 #define FSC_TYPE_OTH   (_AC(0x02,U)<<4)
 #define FSC_TYPE_IMPL  (_AC(0x03,U)<<4)
 
+#define FSC_FLT_ADDR_SIZE (0x00)
 #define FSC_FLT_TRANS  (0x04)
 #define FSC_FLT_ACCESS (0x08)
 #define FSC_FLT_PERM   (0x0c)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 040c0f2e0d..fa02070a86 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -307,6 +307,10 @@ static const char *decode_fsc(uint32_t fsc, int *level)
 
     switch ( fsc & 0x3f )
     {
+    case FSC_FLT_ADDR_SIZE ... FSC_FLT_ADDR_SIZE + 3:
+        msg = "Address size fault";
+        *level = fsc & FSC_LL_MASK;
+        break;
     case FSC_FLT_TRANS ... FSC_FLT_TRANS + 3:
         msg = "Translation fault";
         *level = fsc & FSC_LL_MASK;
@@ -363,6 +367,7 @@ static const char *fsc_level_str(int level)
     switch ( level )
     {
     case -1: return "";
+    case 0:  return " at level 0 or TTBR";
     case 1:  return " at level 1";
     case 2:  return " at level 2";
     case 3:  return " at level 3";
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:46:25 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:46:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428438.1651242 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4z-0001SW-3L; Tue, 22 Sep 2026 09:46:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428438.1651242; Tue, 22 Sep 2026 09:46:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x4z-0001SO-0n; Tue, 22 Sep 2026 09:46:25 +0000
Received: by outflank-mailman (input) for mailman id 1428438;
 Tue, 22 Sep 2026 09:46:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x4x-0001SD-Qa
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:46:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4x-00AmdF-1V
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x4x-00BSYO-2S
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Ri1I6yOigmE6wxwmUNPoIdoyJsMpALcEelrzgQSDKog=; b=m5PETOgd0hQHs4ouJviw21Tk43
	j1dpbZ9oNouwZuabCS76HdPEdKIZBc5Gis+t+p25tbKc1qKv3wUhb0v8vXGQZiYABdZJQQyKuu8Qc
	LSrKLBnobhGg/Vou+7nT5vb+xMChk8sU8r8Ztcm5wELsaBrP0InDyda3KIz95+GA015g=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.21] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x8x4x-00BSYO-2S@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:46:23 +0000

commit 314bdc9be433c39a01af8b25b68ab748aac5e873
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681)
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:46:35 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:46:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428439.1651246 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x59-0001Ut-4g; Tue, 22 Sep 2026 09:46:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428439.1651246; Tue, 22 Sep 2026 09:46:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x59-0001Ul-27; Tue, 22 Sep 2026 09:46:35 +0000
Received: by outflank-mailman (input) for mailman id 1428439;
 Tue, 22 Sep 2026 09:46:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x58-0001Ud-AC
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:46:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x57-00Amdm-37
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x58-00BThX-0q
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=AILOadJnYVboTh3/Lt7lBMF7SfCRnb/aQbehL5gL2Lk=; b=Ixwsau5JzxoH6GGO9yRveVUZ2D
	t3EyurkWdj0hINn5fMxK3GBt0EPla0mVSGpHoYInQ2Aa4s+m1497m+AwsGpCXrKf0XudU2upgYHg0
	Mfa5AW3JlhVLBuZRNZxhX11bwkc19oaPPf3nnpPPVt/OFHPLlCbOlxG1436rZlhwM/uw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/arm: mask debug exceptions in initial AArch64 guest state
Message-Id: <E1x8x58-00BThX-0q@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:46:34 +0000

commit 75f866e9f7656f2c2da71c9412bc5d08e0591ae8
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Fri Jun 19 20:37:38 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:00:01 2026 +0200

    xen/arm: mask debug exceptions in initial AArch64 guest state
    
    PSR_GUEST64_INIT currently masks SError, IRQ and FIQ, but leaves debug
    exceptions unmasked. Both the AArch64 Linux boot protocol and PSCI entry
    requirements expect PSTATE.DAIF to be masked.
    
    Add PSR_DBG_MASK to PSR_GUEST64_INIT. This fixes the initial AArch64 guest
    entry state as well as virtual PSCI CPU_ON and SYSTEM_SUSPEND resume entry.
    
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    (cherry picked from commit ad8663a75aa8db4255d6690bfc210d559edc9f5b)
---
 xen/include/public/arch-arm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index e2412a1747..d41100dcb0 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -408,7 +408,8 @@ typedef uint64_t xen_callback_t;
  * zImage kernels on aarch32.
  */
 #define PSR_GUEST32_INIT (PSR_Z|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+#define PSR_GUEST64_INIT \
+    (PSR_DBG_MASK|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
 
 #define SCTLR_GUEST_INIT    xen_mk_ullong(0x00c50078)
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:46:46 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:46:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428440.1651251 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5K-0001XQ-6A; Tue, 22 Sep 2026 09:46:46 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428440.1651251; Tue, 22 Sep 2026 09:46:46 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5K-0001XI-3S; Tue, 22 Sep 2026 09:46:46 +0000
Received: by outflank-mailman (input) for mailman id 1428440;
 Tue, 22 Sep 2026 09:46:44 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x5I-0001X4-Cw
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:46:44 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5I-00AmeI-09
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:44 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5I-00BUgJ-17
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:44 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=xteuF+1mSWGtZmyA/I26f0iHhSrWHVrYEJz6cdPxlJI=; b=rjVbukgpTR/D7JErtUQwoiaEKE
	O9XNDG8SEFtOrnwruWBRCUqJclZXmZAZePLGemG77tgbGn7R9vrKLC/G6m3pqAnDjdNh2hoxUS+Nc
	RG2lG0LMTIe5XdqMaT+wShZLAplGgTpBrvCPNuRibGizO2Lq0dT2vuATUwMc7hNhykpk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
Message-Id: <E1x8x5I-00BUgJ-17@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:46:44 +0000

commit ec0c241602dfc7ec0a4f39cf3633a326d3e3ecc3
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Aug 5 14:11:24 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:11 2026 +0200

    xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
    
    process_domain_node() parses "xen,static-mem" regardless of
    CONFIG_STATIC_MEMORY. With the feature off, init_staticmem_pages() is a
    no-op stub, so boot carries on until construct_domU() reaches the
    ASSERT_UNREACHABLE() stubs of allocate_static_memory() /
    assign_static_memory_11(): a debug build trips the assertion, a production
    build gives the domain no memory at all.
    
    Bail out at parse time instead, like process_shm_node() already does for
    CONFIG_STATIC_SHM.
    
    Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
    [michal: adjust for code movement]
    (cherry picked from commit e888192d133eeec8a94275eaf4194117f198a7e2)
---
 xen/common/device-tree/bootfdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/bootfdt.c
index 9ce7699833..70d79cfc06 100644
--- a/xen/common/device-tree/bootfdt.c
+++ b/xen/common/device-tree/bootfdt.c
@@ -471,6 +471,12 @@ static int __init process_domain_node(const void *fdt, int node,
         /* No "xen,static-mem" present. */
         return 0;
 
+    if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
+    {
+        printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n");
+        return -EINVAL;
+    }
+
     return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells,
                                    size_cells, bootinfo_get_reserved_mem(),
                                    MEMBANK_STATIC_DOMAIN);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:46:56 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:46:56 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428441.1651255 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5U-0001Zz-7W; Tue, 22 Sep 2026 09:46:56 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428441.1651255; Tue, 22 Sep 2026 09:46:56 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5U-0001Zs-4n; Tue, 22 Sep 2026 09:46:56 +0000
Received: by outflank-mailman (input) for mailman id 1428441;
 Tue, 22 Sep 2026 09:46:54 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x5S-0001Zi-FV
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:46:54 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5S-00Amf6-0P
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:54 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5S-00BVex-1N
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:46:54 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=YkGq+rCxGnIa8zkyk0jc/nTXmJDykRss2BZSCOmvM5w=; b=qBQ+Bv9BBGOt110UL9Al5s00kF
	DBTk7IDL2DBtn/f0EDyPo0vC02zd7WaOMShsG2nM+7c6bTCSGNRiQTCCTQru4Txxoe2acKtZRbfCd
	58TaJiTDRUt7aWdH6loltQt9b2qS8EUslTU2+/0Oyt/e352qRQzgOrJCclFi4YcPEQ0o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/arm: propagate secondary GIC initialization failures
Message-Id: <E1x8x5S-00BVex-1N@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:46:54 +0000

commit 99cdf4a4d468661a094102c9d5800fb470100771
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Mon Aug 10 22:41:46 2026 +0300
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: propagate secondary GIC initialization failures
    
    The GICv3 secondary_init() callback can fail while discovering or
    waking a Redistributor, enabling LPIs, or setting up an ITS collection.
    gic_init_secondary_cpu() currently discards that status. start_secondary()
    then marks the CPU online even though its per-CPU GIC interface may be
    unusable.
    
    Return the callback status through the common GIC layer. Have
    start_secondary() report the failure and stop the affected CPU before it
    updates system features or is added to cpu_online_map.
    
    Fixes: bc183a0235e0 ("xen/arm: Add support for GIC v3")
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit 0102b592f46ff3f0784e693efa0b812551345271)
---
 xen/arch/arm/gic.c             | 10 ++++++++--
 xen/arch/arm/include/asm/gic.h |  2 +-
 xen/arch/arm/smpboot.c         | 11 +++++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index acf61a4de3..bfdd35afb5 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -279,11 +279,17 @@ void smp_send_state_dump(unsigned int cpu)
 }
 
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
-void gic_init_secondary_cpu(void)
+int gic_init_secondary_cpu(void)
 {
-    gic_hw_ops->secondary_init();
+    int rc = gic_hw_ops->secondary_init();
+
+    if ( rc )
+        return rc;
+
     /* Clear LR mask for secondary cpus */
     clear_cpu_lr_mask();
+
+    return 0;
 }
 
 /* Shut down the per-CPU GIC interface */
diff --git a/xen/arch/arm/include/asm/gic.h b/xen/arch/arm/include/asm/gic.h
index 066a00c676..b24f1ecd97 100644
--- a/xen/arch/arm/include/asm/gic.h
+++ b/xen/arch/arm/include/asm/gic.h
@@ -291,7 +291,7 @@ extern void gic_preinit(void);
 /* Bring up the interrupt controller, and report # cpus attached */
 extern void gic_init(void);
 /* Bring up a secondary CPU's per-CPU GIC interface */
-extern void gic_init_secondary_cpu(void);
+extern int gic_init_secondary_cpu(void);
 /* Take down a CPU's per-CPU GIC interface */
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 0f9300aad8..145acf52ec 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -325,6 +325,7 @@ smp_prepare_cpus(void)
 void asmlinkage start_secondary(void)
 {
     unsigned int cpuid = init_data.cpuid;
+    int rc;
 
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
@@ -372,6 +373,14 @@ void asmlinkage start_secondary(void)
         stop_cpu();
     }
 
+    rc = gic_init_secondary_cpu();
+    if ( rc )
+    {
+        printk(XENLOG_ERR "CPU%u: Failed to initialize the GIC: %d\n",
+               smp_processor_id(), rc);
+        stop_cpu();
+    }
+
     /*
      * system features must be updated only if we do not stop the core or
      * we might disable features due to a non used core (for example when
@@ -379,8 +388,6 @@ void asmlinkage start_secondary(void)
      */
     update_system_features(&current_cpu_data);
 
-    gic_init_secondary_cpu();
-
     set_current(idle_vcpu[cpuid]);
 
     /* Run local notifiers */
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:47:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:47:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428442.1651258 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5e-0001cR-8i; Tue, 22 Sep 2026 09:47:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428442.1651258; Tue, 22 Sep 2026 09:47:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5e-0001cJ-6G; Tue, 22 Sep 2026 09:47:06 +0000
Received: by outflank-mailman (input) for mailman id 1428442;
 Tue, 22 Sep 2026 09:47:04 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x5c-0001c7-IZ
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:47:04 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5c-00Amfk-0g
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:04 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5c-00BWSZ-1d
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:04 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=dsalRJtFlV9aVJphSUClSWYJ0x2lM/QBTj3dyjMqt4A=; b=fHX4WujHbjZjYxkKQ8B7QhBDk7
	NttxiDC9WVE82tL4BEyRlk1OTR8H946vcAlO0603TObmbVfWAPLYRf+YXqHqRIigQbRwiuXVYe6UZ
	xMKwYOA98fQ3OCSp7DSk3YemJx4YpyfZI9rlgcbfOgE5scIYF+W0kLo9aM0o7nMyZgoM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
Message-Id: <E1x8x5c-00BWSZ-1d@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:47:04 +0000

commit 1633c8148acbf9fccfbd06a9aaaa16f71b7856b2
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 11 15:08:18 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
    
    The comments on the PMINTENSET/PMINTENCLR cases claim that an EL0 access
    may be trapped to EL2 when MDCR_EL2.TPM is set, and that such a case is
    handled. Both are inaccurate. PMINTENSET_EL1/PMINTENCLR_EL1 are accessible
    at EL1 and above only, with no enable making them accessible at EL0.
    
    Arm ARM (DDI 0487M.b) D1.4.5.6 "Prioritization of Synchronous
    exceptions" orders the two exceptions. An access that is never
    accessible at the current Exception level regardless of any enables or
    traps is priority 18, whereas an exception taken to EL2 as the result of
    a configuration control in MDCR_EL2 is priority 24. An EL0 access is
    therefore UNDEFINED and taken to EL1.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    (cherry picked from commit 87a8a5728e5936f088c94bd7960c70f9b1cef36e)
---
 xen/arch/arm/arm64/vsysreg.c | 4 ----
 xen/arch/arm/vcpreg.c        | 1 -
 2 files changed, 5 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index c73b2c95ce..207c868059 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,10 +229,6 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
-        /*
-         * Accessible from EL1 only, but if EL0 trap happens handle as
-         * undef.
-         */
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 0b336875a4..2ed27084c1 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -294,7 +294,6 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
-        /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:47:16 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:47:16 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428443.1651263 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5o-0001em-Ar; Tue, 22 Sep 2026 09:47:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428443.1651263; Tue, 22 Sep 2026 09:47:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5o-0001ee-7b; Tue, 22 Sep 2026 09:47:16 +0000
Received: by outflank-mailman (input) for mailman id 1428443;
 Tue, 22 Sep 2026 09:47:14 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x5m-0001eT-L9
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:47:14 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5m-00AmgH-0z
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:14 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5m-00BXLc-1w
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:14 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qkNMsBB4hN1m6p/Y0KefvmzV8HCqq05UySK9Oz+ztuA=; b=y/m4/2MSoYvAUtcAxqkVu+XPuz
	LoD7V7i39ercpJJ1yGQgD32G6Btlu2MglSnmSI2ImzRHhmEqpTEb6MC8VSQTDTvT/avUHmEziqqto
	U3zcy0Eqpl5WR3yxQd7b53NS7t/FKJRq49/HPwL7PVI4wFvLG76FVVvxmw0D7duecfjs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
Message-Id: <E1x8x5m-00BXLc-1w@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:47:14 +0000

commit 80bc532b38d6a04fbebba86fcefd66de0ee37545
Author:     Hirokazu Takahashi <taka@valinux.co.jp>
AuthorDate: Wed Aug 26 12:55:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
    
    On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled
    causes the domain to probe advanced PMU feature based on system ID
    register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1,
    which causes unhandled register traps and crashes the domain.
    
    To address this issue, implement the following:
    
    - Add emulation for ID_AA64DFR{0,1}_EL1, ID_DFR{0,1}_EL1 and
      ID_DFR{0,1} register accesses for guest domains.
    - Hide PMU registers from a guest domain when its vPMU feature is
      disabled.
    - Proactively make SPE, TRBE, BRBE, Trace Extensions, SPMU, ITE and
      EBEP inaccessible to arm64 guest domains and hide TraceFilt,
      MMapTrc and CopTrc to arm32 guest domains, as they could
      potentially cause similar issues.
    
    Fixes: dbb948110a0e ("xen: Expose the PMU to the guests")
    Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
    Fixes: 3669a1cb9598 ("xen/arm: create a cpuinfo structure for guest")
    Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit b836ef686efe4d01fb54a12cb1e9df7ec0494201)
---
 xen/arch/arm/arm64/vsysreg.c          | 59 ++++++++++++++++++++++++++++++++---
 xen/arch/arm/cpufeature.c             | 18 +++++++++++
 xen/arch/arm/domain.c                 |  2 +-
 xen/arch/arm/include/asm/arm64/hsr.h  |  1 +
 xen/arch/arm/include/asm/cpregs.h     |  1 +
 xen/arch/arm/include/asm/cpufeature.h | 27 +++++++++++-----
 xen/arch/arm/vcpreg.c                 | 34 ++++++++++++++++----
 xen/include/xen/sched.h               |  5 +++
 8 files changed, 129 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index 207c868059..1a8650f863 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,6 +229,7 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
+    case HSR_SYSREG_PMMIR_EL1:
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
@@ -302,8 +303,32 @@ void do_sysreg(struct cpu_user_regs *regs,
     GENERATE_TID3_INFO(ID_PFR0_EL1, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1_EL1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2_EL1, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0_EL1, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1_EL1, dbg32, 1)
+
+    case HSR_SYSREG_ID_DFR0_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_DFR1_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0_EL1, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0_EL1, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1_EL1, mm32, 1)
@@ -344,8 +369,34 @@ void do_sysreg(struct cpu_user_regs *regs,
     }
 
     GENERATE_TID3_INFO(ID_AA64PFR1_EL1, pfr64, 1)
-    GENERATE_TID3_INFO(ID_AA64DFR0_EL1, dbg64, 0)
-    GENERATE_TID3_INFO(ID_AA64DFR1_EL1, dbg64, 1)
+
+    case HSR_SYSREG_ID_AA64DFR0_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg64.pmu_ver = 0;
+            info_dbg64.pmss = 0;
+            info_dbg64.mtpmu = 0;
+            info_dbg64.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_AA64DFR1_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg64.pmicntr = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AA64ISAR0_EL1, isa64, 0)
     GENERATE_TID3_INFO(ID_AA64ISAR1_EL1, isa64, 1)
     GENERATE_TID3_INFO(ID_AA64MMFR0_EL1, mm64, 0)
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 94d14fb6a9..8d8cd19a96 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -219,8 +219,26 @@ static int __init create_domain_cpuinfo(void)
     domain_cpuinfo.isa64.api = 0;
     domain_cpuinfo.isa64.gpa = 0;
     domain_cpuinfo.isa64.gpi = 0;
+
+    /* Hide SPE, DPFZS, TRBE, BRBE, Trace Extensions, SPMU, ITE and EBEP */
+    domain_cpuinfo.dbg64.trace_ver = 0;
+    domain_cpuinfo.dbg64.pms_ver = 0;
+    domain_cpuinfo.dbg64.dpfzs = 0;
+    domain_cpuinfo.dbg64.trace_filt = 0;
+    domain_cpuinfo.dbg64.trace_buffer = 0;
+    domain_cpuinfo.dbg64.ext_trc_buff = 0;
+    domain_cpuinfo.dbg64.brbe = 0;
+    domain_cpuinfo.dbg64.syspmuid = 0;
+    domain_cpuinfo.dbg64.spmu = 0;
+    domain_cpuinfo.dbg64.ite = 0;
+    domain_cpuinfo.dbg64.ebep = 0;
 #endif
 
+    /* Hide Trace Extensions for AArch32 domain */
+    domain_cpuinfo.dbg32.coptrc = 0;
+    domain_cpuinfo.dbg32.mmaptrc = 0;
+    domain_cpuinfo.dbg32.tracefilt = 0;
+
     /* Hide AMU support */
 #ifdef CONFIG_ARM_64
     domain_cpuinfo.pfr64.amu = 0;
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 2d00b4ce1d..f0a92ae219 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -555,7 +555,7 @@ int arch_vcpu_create(struct vcpu *v)
     v->arch.hcr_el2 = get_default_hcr_flags();
 
     v->arch.mdcr_el2 = HDCR_TDRA | HDCR_TDOSA | HDCR_TDA;
-    if ( !(v->domain->options & XEN_DOMCTL_CDF_vpmu) )
+    if ( !is_vpmu_domain(v->domain) )
         v->arch.mdcr_el2 |= HDCR_TPM | HDCR_TPMCR;
 
     if ( (rc = vcpu_vgic_init(v)) != 0 )
diff --git a/xen/arch/arm/include/asm/arm64/hsr.h b/xen/arch/arm/include/asm/arm64/hsr.h
index 1495ccddea..ed18184cc7 100644
--- a/xen/arch/arm/include/asm/arm64/hsr.h
+++ b/xen/arch/arm/include/asm/arm64/hsr.h
@@ -84,6 +84,7 @@
 #define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
 #define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1)
 #define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2)
+#define HSR_SYSREG_PMMIR_EL1      HSR_SYSREG(3,0,c9,c14,6)
 #define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
 #define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
 #define HSR_SYSREG_ICC_SGI1R_EL1  HSR_SYSREG(3,0,c12,c11,5)
diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h
index aec9e8f329..01204c06a4 100644
--- a/xen/arch/arm/include/asm/cpregs.h
+++ b/xen/arch/arm/include/asm/cpregs.h
@@ -244,6 +244,7 @@
 #define PMINTENSET      p15,0,c9,c14,1  /* Perf. Mon. Interrupt Enable Set Register */
 #define PMINTENCLR      p15,0,c9,c14,2  /* Perf. Mon. Interrupt Enable Clear Register */
 #define PMOVSSET        p15,0,c9,c14,3  /* Perf. Mon. Overflow Flag Status Set register */
+#define PMMIR           p15,0,c9,c14,6  /* Perf. Mon. Machine Identification Register */
 
 /* CP15 CR10: */
 #define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index 50297e53d9..5c04a2970f 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -208,7 +208,7 @@ struct cpuinfo_arm {
         };
     } pfr64;
 
-    union {
+    union cpuinfo_dbg64 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -216,19 +216,31 @@ struct cpuinfo_arm {
             unsigned long trace_ver:4;
             unsigned long pmu_ver:4;
             unsigned long brps:4;
-            unsigned long __res0:4;
+            unsigned long pmss:4;
             unsigned long wrps:4;
             unsigned long __res1:4;
             unsigned long ctx_cmps:4;
             unsigned long pms_ver:4;
             unsigned long double_lock:4;
             unsigned long trace_filt:4;
-            unsigned long __res2:4;
+            unsigned long trace_buffer:4;
             unsigned long mtpmu:4;
-            unsigned long __res3:12;
+            unsigned long brbe:4;
+            unsigned long ext_trc_buff:4;
+            unsigned long hpmn0:4;
 
             /* DFR1 */
-            unsigned long __res4:64;
+            unsigned long syspmuid:8;
+            unsigned long brps1:8;
+            unsigned long wrps1:8;
+            unsigned long ctx_cmps1:8;
+            unsigned long spmu:4;
+            unsigned long pmicntr:4;
+            unsigned long able:4;
+            unsigned long ite:4;
+            unsigned long ebep:4;
+            unsigned long dpfzs:4;
+            unsigned long abl_cmps:8;
         };
     } dbg64;
 
@@ -401,7 +413,7 @@ struct cpuinfo_arm {
         };
     } pfr32;
 
-    union {
+    union cpuinfo_dbg32 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -419,7 +431,8 @@ struct cpuinfo_arm {
 
             /* DFR1 */
             unsigned long mtpmu:4;
-            unsigned long __res1:28;
+            unsigned long hpmn0:4;
+            unsigned long __res1:24;
 #ifdef CONFIG_ARM_64
             unsigned long __res2:32;
 #endif
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 2ed27084c1..a946f46495 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -278,10 +278,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
      *
      * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR.
      */
-    /* We could trap ID_DFR0 and tell the guest we don't support
-     * performance monitoring, but Linux doesn't check the ID_DFR0.
-     * Therefore it will read PMCR.
-     *
+    /*
      * We tell the guest we have 0 counters. Unfortunately we must
      * always support PMCCNTR (the cyle counter): we just RAZ/WI for all
      * PM register, which doesn't crash the kernel at least
@@ -294,6 +291,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
+    case HSR_CPREG32(PMMIR):
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
@@ -322,8 +320,32 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
     GENERATE_TID3_INFO(ID_PFR0, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1, dbg32, 1)
+
+    case HSR_CPREG32(ID_DFR0):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_CPREG32(ID_DFR1):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1, mm32, 1)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index df8828706d..dfcb4065fb 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -1215,6 +1215,11 @@ static always_inline bool is_iommu_enabled(const struct domain *d)
     return evaluate_nospec(d->options & XEN_DOMCTL_CDF_iommu);
 }
 
+static inline bool is_vpmu_domain(const struct domain *d)
+{
+    return d->options & XEN_DOMCTL_CDF_vpmu;
+}
+
 #ifdef CONFIG_MEM_PAGING
 # define mem_paging_enabled(d) vm_event_check_ring((d)->vm_event_paging)
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:47:26 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:47:26 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428444.1651267 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5y-0001hh-DN; Tue, 22 Sep 2026 09:47:26 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428444.1651267; Tue, 22 Sep 2026 09:47:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x5y-0001hZ-Ai; Tue, 22 Sep 2026 09:47:26 +0000
Received: by outflank-mailman (input) for mailman id 1428444;
 Tue, 22 Sep 2026 09:47:24 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x5w-0001hN-O3
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:47:24 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5w-00Amgl-1G
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:24 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x5w-00BYLv-2C
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:24 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=xLNSrbrWkQYzwgIfGvJPN/fX3bV5YmQSnslG1SHGsPk=; b=luXW5z0Zv92jF6mplJuPqrb1PR
	ktXPFNJmLy2FolHrrEqfiivPXWuFH/dycTaYjgk1UVeDtZ19UXBBfVk/HU6wlXwZQrI27v0zuGbq2
	0XeipXc9pwbnAt3Jgc+a9+4LiRp7ZxgQLUn8IGR26TVuytGRwztDV5he0Rm70j+ncOw0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/arm: traps: report level 0 faults in panic_PAR()
Message-Id: <E1x8x5w-00BYLv-2C@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:47:24 +0000

commit c1a06e5121b3202a96990633b4a95e0adb625808
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 25 08:23:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: traps: report level 0 faults in panic_PAR()
    
    decode_fsc() derives the fault level from the low two bits of the FSC, so
    level 0 is a valid output: FSC_FLT_TRANS is 0x04, i.e. "translation fault,
    level 0 or translation table base register".
    
    This is reachable on arm64 because xen_pgtable is the zeroeth-level root,
    but fsc_level_str() has no case for it and prints " (level invalid)"
    instead. At the time the function was created Xen used only three levels.
    
    Add the missing case. On arm32 the zeroeth level does not exist but FSC
    0 denotes address size fault at translation table base register.
    
    While at it, make decode_fsc() decode also address size faults.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    (cherry picked from commit 4e1f58ea1a20d8a831ad72aa30eafa618dfae750)
---
 xen/arch/arm/include/asm/processor.h | 2 ++
 xen/arch/arm/traps.c                 | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
index 2405616534..58f673cb6b 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -513,6 +513,7 @@ extern register_t __cpu_logical_map[];
 /*
  * 543210 BIT
  * 00XXLL -- XX Fault Level LL
+ * ..00LL -- Address Size Fault LL
  * ..01LL -- Translation Fault LL
  * ..10LL -- Access Fault LL
  * ..11LL -- Permission Fault LL
@@ -526,6 +527,7 @@ extern register_t __cpu_logical_map[];
 #define FSC_TYPE_OTH   (_AC(0x02,U)<<4)
 #define FSC_TYPE_IMPL  (_AC(0x03,U)<<4)
 
+#define FSC_FLT_ADDR_SIZE (0x00)
 #define FSC_FLT_TRANS  (0x04)
 #define FSC_FLT_ACCESS (0x08)
 #define FSC_FLT_PERM   (0x0c)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 4b7ccdf485..f08c1390af 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -307,6 +307,10 @@ static const char *decode_fsc(uint32_t fsc, int *level)
 
     switch ( fsc & 0x3f )
     {
+    case FSC_FLT_ADDR_SIZE ... FSC_FLT_ADDR_SIZE + 3:
+        msg = "Address size fault";
+        *level = fsc & FSC_LL_MASK;
+        break;
     case FSC_FLT_TRANS ... FSC_FLT_TRANS + 3:
         msg = "Translation fault";
         *level = fsc & FSC_LL_MASK;
@@ -363,6 +367,7 @@ static const char *fsc_level_str(int level)
     switch ( level )
     {
     case -1: return "";
+    case 0:  return " at level 0 or TTBR";
     case 1:  return " at level 1";
     case 2:  return " at level 2";
     case 3:  return " at level 3";
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 09:47:36 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 09:47:36 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428445.1651272 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x68-0001lk-Ex; Tue, 22 Sep 2026 09:47:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428445.1651272; Tue, 22 Sep 2026 09:47:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8x68-0001lc-C2; Tue, 22 Sep 2026 09:47:36 +0000
Received: by outflank-mailman (input) for mailman id 1428445;
 Tue, 22 Sep 2026 09:47:34 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8x66-0001k4-QX
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 09:47:34 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x66-00AmhL-1W
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:34 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8x66-00BZDq-2U
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 09:47:34 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=wzg5hK7cj6R/qqsre4/X4iyTJt1iBDmIpRNXwm9g7ps=; b=oDFtb3uXXd/ImcOEZVl71edkw+
	QdBmA6qaiBDZQdEpv7E97RFnqERlUPsF+5XTBBorrV8sp55fhickKtXrGfjAck1sebhxW9Am3z5g0
	pBD1SCFEXTvUfiWHeH69sbFUFfanRib4IdXPwHbFVHCJ4ZHpNnSPqAkJ/8bLbzbXtKC4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging-4.20] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x8x66-00BZDq-2U@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 09:47:34 +0000

commit f9c21d1718f88e357867d2afa3840960269a6126
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681)
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:44:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:44:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428601.1651455 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xym-00042S-1C; Tue, 22 Sep 2026 10:44:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428601.1651455; Tue, 22 Sep 2026 10:44:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xyl-00042K-Uo; Tue, 22 Sep 2026 10:44:03 +0000
Received: by outflank-mailman (input) for mailman id 1428601;
 Tue, 22 Sep 2026 10:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xyk-00042A-9o
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:44:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xyj-00Aq1t-2m
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xyk-00FwWZ-0U
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=dnqsE/XwMraSDuHuhSpV7s2HzITfwLg8O1caRh1kJUc=; b=AP3Ok5vG64ILySh7gfSieFm8ro
	SO4880msSnkVI16hcVlB+3JvzSDn1lm/+dFo+5hXvN5R5VtfIHLGoX3oSkbGd18A9Y7+aPbMQw+0O
	BrRV7gjrf1H+KRRqo3ryhlprnYNWmdr//AnioZj40r6RygjGdwqTqs6XDvFkfIFhroQg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] lib: obey to Misra rule 11.8 where possible
Message-Id: <E1x8xyk-00FwWZ-0U@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:44:02 +0000

commit d4d8d3bfbad042f66e7342bf11923703cfbf7fec
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:12:33 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:12:33 2026 +0200

    lib: obey to Misra rule 11.8 where possible
    
    Casting away const-ness (or volatile-ness) is never a good idea, but
    some library functions (e.g. strchr()) require doing so. Where not
    required, remove / replace respective casts.
    
    While there convert touched functions to Xen style.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 xen/lib/memcpy.c  |  9 +++++----
 xen/lib/memmove.c | 30 +++++++++++++++++-------------
 xen/lib/strcmp.c  | 15 +++++++--------
 xen/lib/strncmp.c | 19 ++++++++++---------
 4 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/xen/lib/memcpy.c b/xen/lib/memcpy.c
index 5476121c0d..ff7e5487e3 100644
--- a/xen/lib/memcpy.c
+++ b/xen/lib/memcpy.c
@@ -15,12 +15,13 @@
  */
 void *(memcpy)(void *dest, const void *src, size_t n)
 {
-	char *tmp = (char *) dest, *s = (char *) src;
+    char *tmp = dest;
+    const char *s = src;
 
-	while (n--)
-		*tmp++ = *s++;
+    while ( n-- )
+        *tmp++ = *s++;
 
-	return dest;
+    return dest;
 }
 
 /*
diff --git a/xen/lib/memmove.c b/xen/lib/memmove.c
index 99804352e6..6d32f0d65c 100644
--- a/xen/lib/memmove.c
+++ b/xen/lib/memmove.c
@@ -14,21 +14,25 @@
  */
 void *(memmove)(void *dest, const void *src, size_t n)
 {
-	char *tmp, *s;
+    char *tmp;
+    const char *s;
 
-	if (dest <= src) {
-		tmp = (char *) dest;
-		s = (char *) src;
-		while (n--)
-			*tmp++ = *s++;
-	} else {
-		tmp = (char *) dest + n;
-		s = (char *) src + n;
-		while (n--)
-			*--tmp = *--s;
-	}
+    if ( dest <= src )
+    {
+        tmp = dest;
+        s = src;
+        while ( n-- )
+            *tmp++ = *s++;
+    }
+    else
+    {
+        tmp = dest + n;
+        s = src + n;
+        while ( n-- )
+            *--tmp = *--s;
+    }
 
-	return dest;
+    return dest;
 }
 
 /*
diff --git a/xen/lib/strcmp.c b/xen/lib/strcmp.c
index f85c1e8741..6b32693d57 100644
--- a/xen/lib/strcmp.c
+++ b/xen/lib/strcmp.c
@@ -11,16 +11,15 @@
  */
 int (strcmp)(const char *cs, const char *ct)
 {
-	unsigned char *csu = (unsigned char *)cs;
-	unsigned char *ctu = (unsigned char *)ct;
-	int res;
+    const unsigned char *csu = (const void *)cs;
+    const unsigned char *ctu = (const void *)ct;
+    int res;
 
-	while (1) {
-		if ((res = *csu - *ctu++) != 0 || !*csu++)
-			break;
-	}
+    for ( ; ; )
+        if ( (res = *csu - *ctu++) != 0 || !*csu++ )
+            break;
 
-	return res;
+    return res;
 }
 
 /*
diff --git a/xen/lib/strncmp.c b/xen/lib/strncmp.c
index 1480f58c2e..80a09d665b 100644
--- a/xen/lib/strncmp.c
+++ b/xen/lib/strncmp.c
@@ -12,17 +12,18 @@
  */
 int (strncmp)(const char *cs, const char *ct, size_t count)
 {
-	unsigned char *csu = (unsigned char *)cs;
-	unsigned char *ctu = (unsigned char *)ct;
-	int res = 0;
+    const unsigned char *csu = (const void *)cs;
+    const unsigned char *ctu = (const void *)ct;
+    int res = 0;
 
-	while (count) {
-		if ((res = *csu - *ctu++) != 0 || !*csu++)
-			break;
-		count--;
-	}
+    while ( count )
+    {
+        if ( (res = *csu - *ctu++) != 0 || !*csu++ )
+            break;
+        count--;
+    }
 
-	return res;
+    return res;
 }
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:44:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:44:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428602.1651461 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xyw-00044h-3a; Tue, 22 Sep 2026 10:44:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428602.1651461; Tue, 22 Sep 2026 10:44:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xyw-00044Z-09; Tue, 22 Sep 2026 10:44:14 +0000
Received: by outflank-mailman (input) for mailman id 1428602;
 Tue, 22 Sep 2026 10:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xyu-00044K-9m
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xyt-00Aq2P-33
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xyu-00FxH1-0l
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eWemRVnZvQONPU6M41Pim9S8Hl7+H2Ly51NCMyKuASg=; b=s9Z1M4MMDwc7xpnN2KUSM7OXfM
	mUx34I8OdIXftWOqVPmu3FO5MgatHZgNYUXCIhip80i5xR9XLo1Ga2kDOZAMc+waDgsS7RBw/cVpX
	NqDC1h8iFf4H2qfcTouWZ9TrS0I0LdtTj2ZqaAzhSmZHOkc4UaQ5bGUHd5P7FqsJ+Gvo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm/guestcopy: deviate copy_guest() uses just like their x86 counterparts
Message-Id: <E1x8xyu-00FxH1-0l@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:44:12 +0000

commit 40ad6282e2b41700734ea4f480ca7f68c9f5c499
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:13:19 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:13:19 2026 +0200

    Arm/guestcopy: deviate copy_guest() uses just like their x86 counterparts
    
    Like x86/HVM's __hvm_copy(), Arm's copy_guest() is used for both to-guest
    and from-guest copying. Naturally in the latter case the hypervisor buffer
    needs writing to, hence the function parameter cannot be pointer-to-const.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 6 ++++++
 xen/arch/arm/guestcopy.c                         | 8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
index 670d3693d6..33d508a2fb 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -433,6 +433,12 @@ Fixing this violation would require to increase code complexity and lower readab
 -config=MC3A2.R11.8,reports+={safe,"any_area(any_loc(any_exp(macro(^container_of$))))"}
 -doc_end
 
+-doc_begin="Function copy_guest() in xen/arch/arm/guestcopy.c is a double-use
+function, where the parameter needs to not be const because it can be set for
+write or not"
+-config=MC3A2.R11.8,reports+={safe,"any_area(any_loc(text(^.*copy_guest.*COPY_to_guest doesn't modify.*$)))"}
+-doc_end
+
 -doc_begin="Function __hvm_copy in xen/arch/x86/hvm/hvm.c is a double-use
 function, where the parameter needs to not be const because it can be set for
 write or not"
diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index 86f1c9d0e3..2235d23ba5 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -109,14 +109,16 @@ static unsigned long copy_guest(void *buf, uint64_t addr, unsigned long len,
 
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int len)
 {
-    return copy_guest((void *)from, (vaddr_t)to, len,
-                      GVA_INFO(current), COPY_to_guest | COPY_linear);
+    return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
+                      (vaddr_t)to, len, GVA_INFO(current),
+                      COPY_to_guest | COPY_linear);
 }
 
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned int len)
 {
-    return copy_guest((void *)from, (vaddr_t)to, len, GVA_INFO(current),
+    return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
+                      (vaddr_t)to, len, GVA_INFO(current),
                       COPY_to_guest | COPY_flush_dcache | COPY_linear);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:44:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:44:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428603.1651463 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xz6-000479-3y; Tue, 22 Sep 2026 10:44:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428603.1651463; Tue, 22 Sep 2026 10:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xz6-000471-1R; Tue, 22 Sep 2026 10:44:24 +0000
Received: by outflank-mailman (input) for mailman id 1428603;
 Tue, 22 Sep 2026 10:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xz4-00046p-JJ
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xz4-00Aq2u-06
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xz4-00FyCQ-13
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=s+dTWRdqm48hO4sRhfSYuUAmmX/HHVTsJubTInoGXCo=; b=LCOFyWzup4Pklx3BBJvD4rMuSs
	ZcgL9Hr+kfZqvL43tbpljxclcvtdLEmPQ/Vfc4CxXLrylfW6/GGxaQ1d9FGuYmkyry5gC51KmAk03
	iPzMhbpMmsmy5W01RYoADlo0MIAQRo0fNBJYCwYym8njyhDKsccy8GfzA6Nw3VB7JxLw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] crypto/vmac: don't cast away const-ness in aes_key_setup()
Message-Id: <E1x8xz4-00FyCQ-13@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:44:22 +0000

commit 25055cde9156268f32e61836f648aa0af128c05d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:13:47 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:13:47 2026 +0200

    crypto/vmac: don't cast away const-ness in aes_key_setup()
    
    vmac_set_key() passes in a pointer-to-const, which has const-ness removed
    despite rijndaelKeySetupEnc() properly taking pointer-to-const.
    
    No functional change.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
 xen/include/crypto/vmac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/crypto/vmac.h b/xen/include/crypto/vmac.h
index 735d2760a5..98e50b242f 100644
--- a/xen/include/crypto/vmac.h
+++ b/xen/include/crypto/vmac.h
@@ -69,7 +69,7 @@ typedef u32 aes_int_key[4*(VMAC_KEY_LEN/32+7)];
 	    				    (u8 *)(in), (u8 *)(out))
 #define aes_key_setup(user_key,int_key)                 \
 	    	rijndaelKeySetupEnc((u32 *)(int_key),       \
-	    	                    (u8 *)(user_key), \
+	    	                    (const u8 *)(user_key), \
 	    	                    VMAC_KEY_LEN)
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:44:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:44:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428604.1651466 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzG-00049W-5C; Tue, 22 Sep 2026 10:44:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428604.1651466; Tue, 22 Sep 2026 10:44:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzG-00049O-2h; Tue, 22 Sep 2026 10:44:34 +0000
Received: by outflank-mailman (input) for mailman id 1428604;
 Tue, 22 Sep 2026 10:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xzE-00049D-Fp
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzE-00Aq3N-0Q
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzE-00FzAU-1J
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=hMJ4SFjeOjkQvgGQr7arA0mN4dE3Fbdw6cqimngVGsk=; b=HjPeTcJTFDfQX1SYfQniVaOjNJ
	aMXoKM4G19Ond9eag/JWTCsbTUALC543RQZPMLX/eNAOT4M8UkbIRIeg9fdCmtzIpJteKq6x6IoxH
	lLQLJ6FwJ9AetMkH9tylnilUe+ZEMBuKYAsdoL9NyccxShwT6RTaAbGNTBoO5jS57Eo4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pagewalk: avoid ACCESS_ONCE() in compound literals
Message-Id: <E1x8xzE-00FzAU-1J@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:44:32 +0000

commit 578ac3ee3ec278c57aaae70eeeb8b6410228ab7d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:15:05 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:15:05 2026 +0200

    x86/pagewalk: avoid ACCESS_ONCE() in compound literals
    
    Compound literals are also covered by Misra C:2012 rule 13.1
    ("Initializer lists shall not contain persistent side effects"), and
    (sadly?) that rule also applies to lists with just a single element, or
    more generally with just a single side effect. Use intermediate variables
    to overcome this as well as ACCESS_ONCE()'s restriction to be usable on
    scalar types only.
    
    No functional change intended.
    
    Fixes: 0345b835dc97 ("x86/pagewalk: Read guest PTEs with ACCESS_ONCE()")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/mm/guest_walk.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c
index df2ccaa674..9583d79102 100644
--- a/xen/arch/x86/mm/guest_walk.c
+++ b/xen/arch/x86/mm/guest_walk.c
@@ -129,7 +129,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l4_table_offset(va) * sizeof(gw->l4e);
     if ( !hvmemul_read_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e)) )
     {
-        gw->l4e = (guest_l4e_t){ ACCESS_ONCE(l4p[guest_l4_table_offset(va)].l4) };
+        guest_intpte_t l4e = ACCESS_ONCE(l4p[guest_l4_table_offset(va)].l4);
+
+        gw->l4e = (guest_l4e_t){ l4e };
         hvmemul_write_cache(v, l4gpa, &gw->l4e, sizeof(gw->l4e));
     }
     gflags = guest_l4e_get_flags(gw->l4e);
@@ -164,7 +166,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l3_table_offset(va) * sizeof(gw->l3e);
     if ( !hvmemul_read_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e)) )
     {
-        gw->l3e = (guest_l3e_t){ ACCESS_ONCE(l3p[guest_l3_table_offset(va)].l3) };
+        guest_intpte_t l3e = ACCESS_ONCE(l3p[guest_l3_table_offset(va)].l3);
+
+        gw->l3e = (guest_l3e_t){ l3e };
         hvmemul_write_cache(v, l3gpa, &gw->l3e, sizeof(gw->l3e));
     }
     gflags = guest_l3e_get_flags(gw->l3e);
@@ -264,7 +268,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
     l2gpa += guest_l2_table_offset(va) * sizeof(gw->l2e);
     if ( !hvmemul_read_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e)) )
     {
-        gw->l2e = (guest_l2e_t){ ACCESS_ONCE(l2p[guest_l2_table_offset(va)].l2) };
+        guest_intpte_t l2e = ACCESS_ONCE(l2p[guest_l2_table_offset(va)].l2);
+
+        gw->l2e = (guest_l2e_t){ l2e };
         hvmemul_write_cache(v, l2gpa, &gw->l2e, sizeof(gw->l2e));
     }
 
@@ -353,7 +359,9 @@ guest_walk_tables(const struct vcpu *v, struct p2m_domain *p2m,
             guest_l1_table_offset(va) * sizeof(gw->l1e);
     if ( !hvmemul_read_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e)) )
     {
-        gw->l1e = (guest_l1e_t){ ACCESS_ONCE(l1p[guest_l1_table_offset(va)].l1) };
+        guest_intpte_t l1e = ACCESS_ONCE(l1p[guest_l1_table_offset(va)].l1);
+
+        gw->l1e = (guest_l1e_t){ l1e };
         hvmemul_write_cache(v, l1gpa, &gw->l1e, sizeof(gw->l1e));
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:44:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:44:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428605.1651471 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzQ-0004Bj-6v; Tue, 22 Sep 2026 10:44:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428605.1651471; Tue, 22 Sep 2026 10:44:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzQ-0004Bb-3w; Tue, 22 Sep 2026 10:44:44 +0000
Received: by outflank-mailman (input) for mailman id 1428605;
 Tue, 22 Sep 2026 10:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xzO-0004BP-Ii
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzO-00Aq3s-0i
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzO-00G00l-1e
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=fhNPU9VXo1Sa+HMF5n74VjYn/+GWdVjrtVcMwH20YZo=; b=2k6xjx73I7DpxeuhmQg490NT8q
	fa0z6VRlSIHcu7tpY4E6kDbQdj/WPW5acMCWF69K5ENpU+Jz1c1BRwZYDvsohslPcRkYF3asqxhHh
	l4ogQrnvXgyHTFkT74SL4UHgTmYD3JAWd2kPSSsj1QqobCkZv2svKdN79+ZGR0bfVMiE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm/guestcopy: avoid use of "current" in compound literals
Message-Id: <E1x8xzO-00G00l-1e@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:44:42 +0000

commit 7963131d640f142c16dd6f835cfe3b8a2f347792
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:15:48 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:15:48 2026 +0200

    Arm/guestcopy: avoid use of "current" in compound literals
    
    Compound literals are also covered by Misra C:2012 rule 13.1
    ("Initializer lists shall not contain persistent side effects"), and
    (sadly?) that rule also applies to lists with just a single element, or
    more generally with just a single side effect. Use intermediate variables
    to overcome this.
    
    No functional change intended.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/guestcopy.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c
index 2235d23ba5..cec33049b3 100644
--- a/xen/arch/arm/guestcopy.c
+++ b/xen/arch/arm/guestcopy.c
@@ -109,29 +109,37 @@ static unsigned long copy_guest(void *buf, uint64_t addr, unsigned long len,
 
 unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int len)
 {
+    struct vcpu *curr = current;
+
     return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
-                      (vaddr_t)to, len, GVA_INFO(current),
+                      (vaddr_t)to, len, GVA_INFO(curr),
                       COPY_to_guest | COPY_linear);
 }
 
 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from,
                                              unsigned int len)
 {
+    struct vcpu *curr = current;
+
     return copy_guest((void *)from, /* COPY_to_guest doesn't modify */
-                      (vaddr_t)to, len, GVA_INFO(current),
+                      (vaddr_t)to, len, GVA_INFO(curr),
                       COPY_to_guest | COPY_flush_dcache | COPY_linear);
 }
 
 unsigned long raw_clear_guest(void *to, unsigned int len)
 {
-    return copy_guest(NULL, (vaddr_t)to, len, GVA_INFO(current),
+    struct vcpu *curr = current;
+
+    return copy_guest(NULL, (vaddr_t)to, len, GVA_INFO(curr),
                       COPY_to_guest | COPY_linear);
 }
 
 unsigned long raw_copy_from_guest(void *to, const void __user *from,
                                   unsigned int len)
 {
-    return copy_guest(to, (vaddr_t)from, len, GVA_INFO(current),
+    struct vcpu *curr = current;
+
+    return copy_guest(to, (vaddr_t)from, len, GVA_INFO(curr),
                       COPY_from_guest | COPY_linear);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:44:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:44:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428606.1651474 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xza-0004Eu-9C; Tue, 22 Sep 2026 10:44:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428606.1651474; Tue, 22 Sep 2026 10:44:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xza-0004El-6h; Tue, 22 Sep 2026 10:44:54 +0000
Received: by outflank-mailman (input) for mailman id 1428606;
 Tue, 22 Sep 2026 10:44:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xzY-0004EF-LO
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:44:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzY-00Aq4L-10
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzY-00G0mw-1w
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:44:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ABdNZKogPQO5gn9tJFsvrvDiFldrxJ+knos5a2Bxd7k=; b=W1KKJ3aEUMQ4YjpoTQ6KjuhjyC
	RqSLMs6PfC5d08c+ctsBkeOhuXOckGDEEBrG3bHw02pH2B22xh/+QRzobb3LHqK0SW0upKKnoJ1AP
	n13F1ndpJl/lyOokLT/PX+2m4OAIf8utvxlZvXkZ28a1mYww/zerb7vsnJ8BFZMd1794=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] automation/Eclair: tag rule 13.1 as clean
Message-Id: <E1x8xzY-00G0mw-1w@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:44:52 +0000

commit 5b063007d56faba6931f8344a9541453959ecad0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:17:04 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:17:04 2026 +0200

    automation/Eclair: tag rule 13.1 as clean
    
    Remaining violations were addressed.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 automation/eclair_analysis/ECLAIR/tagging.ecl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/eclair_analysis/ECLAIR/tagging.ecl
index c79358bdae..eeccb57426 100644
--- a/automation/eclair_analysis/ECLAIR/tagging.ecl
+++ b/automation/eclair_analysis/ECLAIR/tagging.ecl
@@ -66,6 +66,7 @@ MC3A2.R11.7||
 MC3A2.R11.9||
 MC3A2.R12.2||
 MC3A2.R12.5||
+MC3A2.R13.1||
 MC3A2.R13.2||
 MC3A2.R13.6||
 MC3A2.R14.1||
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:45:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:45:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428607.1651479 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzk-0004Im-AW; Tue, 22 Sep 2026 10:45:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428607.1651479; Tue, 22 Sep 2026 10:45:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzk-0004Ie-7x; Tue, 22 Sep 2026 10:45:04 +0000
Received: by outflank-mailman (input) for mailman id 1428607;
 Tue, 22 Sep 2026 10:45:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xzi-0004IS-OI
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:45:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzi-00Aq5S-1H
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzi-00G1hw-2E
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=kEHR/S1uvXwiK6hP6lmDFVzLpuUIUVfmetj/qm1miiQ=; b=K7wO6Tt1+L8kG6CjUdkHjylBwh
	2wD6aRgvejemxqQ1/KEmHmhfhvcU1PZYpDEeNFQJLXRUXWu+E9HiLNOgrrN1hcXSvMopSkeU+p5YS
	KOyhKqzph8PyDVcTAADmg+ZAasr5dODayz2zlee8DXoC+TpTKq33l0MwCoOndAwrZixs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm: split xen-syms linking rule
Message-Id: <E1x8xzi-00G1hw-2E@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:45:02 +0000

commit 223ac5068a61eb98b9e1a859a711c45d81326204
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:17:48 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:00 2026 +0200

    Arm: split xen-syms linking rule
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    [re-]using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations.
    
    By re-using the generic rules introduced when the respective x86 rule was
    split,
    - the .map file now isn't created after the final binary anymore,
    - --strip-debug is passed to $(LD) during early linking passes (for
      consistency the option is also explicitly added to the optional linking
      pass rule),
    - CONFIG_{SUPPRESS_DUPLICATE_SYMBOL_WARNINGS,ENFORCE_UNIQUE_SYMBOLS} are
      now properly respected.
    Orphan section checking and erroring on duplicate symbols, otoh, are
    getting suppressed for now, until the about a dozen orphan section
    warnings and the one duplicate symbol error which would result have been
    taken care of.
    
    While the 4th linking step continues to be avoided when possible, a
    redundant invocation of $(NM) and tools/symbols (plus the assembling of
    the resulting .S file) is hopefully deemed acceptable.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
    Acked-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/Makefile     | 43 +++++++++----------------------------------
 xen/scripts/Makefile.link | 13 +++++++++++++
 2 files changed, 22 insertions(+), 34 deletions(-)

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index b7afd3e58c..e9b003610b 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -84,40 +84,15 @@ ifeq ($(CONFIG_ARM_64),y)
 	ln -sf $(@F) $@.efi
 endif
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	if ! { $(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o) >/dev/null; }; \
-	then \
-		set -e; \
-		$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-		    $(dot-target).2.o -o $(dot-target).2; \
-		$(NM) -pa --format=sysv $(dot-target).2 \
-			| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-			> $(dot-target).3.S; \
-		$(MAKE) $(build)=$(@D) $(dot-target).3.o; \
-		$(call compare-symbol-tables, $(dot-target).2.o, $(dot-target).3.o); \
-	else \
-		ln -sf $(dot-target).2.o $(dot-target).3.o; \
-	fi
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).3.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
+LAST_LINKING_PASS := 3
+
+include scripts/Makefile.link
+
+# Suppress orphan section checking for the time being.
+orphan-handling-y :=
+
+# Downgrade duplicate symbol errors to warnings for the time being.
+syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --warn-dup
 
 .PHONY: include
 include:
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
index 6d463a8514..4b8ae90eee 100644
--- a/xen/scripts/Makefile.link
+++ b/xen/scripts/Makefile.link
@@ -33,6 +33,19 @@ final-image-check-y ?= true
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
 	      $(build_id_linker) --strip-debug -o $@
 
+ifneq ($(LAST_LINKING_PASS),2)
+
+.$(TARGET)-syms.2: $(objtree)/prelink.o .$(TARGET)-syms.2.o $(obj)/xen.lds
+	if ! { $(call compare-symbol-tables, .$(TARGET)-syms.1.o, .$(TARGET)-syms.2.o) >/dev/null; }; \
+	then \
+		$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
+		      $(build_id_linker) --strip-debug -o $@; \
+	else \
+		ln -sf .$(TARGET)-syms.1 $@; \
+	fi
+
+endif
+
 .$(TARGET)-syms.$(LAST_LINKING_PASS): $(objtree)/prelink.o \
                                       .$(TARGET)-syms.$(LAST_LINKING_PASS).o \
                                       $(obj)/xen.lds
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:45:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:45:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428608.1651483 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzu-0004L7-CE; Tue, 22 Sep 2026 10:45:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428608.1651483; Tue, 22 Sep 2026 10:45:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8xzu-0004Ky-9N; Tue, 22 Sep 2026 10:45:14 +0000
Received: by outflank-mailman (input) for mailman id 1428608;
 Tue, 22 Sep 2026 10:45:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8xzs-0004Ko-Qo
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:45:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzs-00Aq5t-1X
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8xzs-00G2Rc-2U
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=9gejGCqOIQpVlhNRajMZ2hERan2ZUvw5xDQ7NtElS8Y=; b=JuQ0zRkrAG83LaJxdfgP0ELR1L
	pdQ5WBXiq3VaqhTbdkZETFkXtE9PHw0MSy6uOtPdq8oMNvDuL9Rftn6eSSvdLo7lQSobI5DdohmCF
	dHS7Tu7fOW1xDzdwwCkYbtE6W/q9RobyiMOmjxMsepqAbpMWPCpcVtVzw22HzltiFVNs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] RISC-V: split xen-syms linking rule
Message-Id: <E1x8xzs-00G2Rc-2U@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:45:12 +0000

commit 37cd2d7d4606197180094230a9e11f4e32850c49
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:18:22 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:17 2026 +0200

    RISC-V: split xen-syms linking rule
    
    Doing so, besides (hopefully) adding clarity (not the least by way of
    [re-]using pattern rules where possible), also avoids explicit recursive
    $(MAKE) invocations.
    
    By re-using the generic rules introduced when the respective x86 rule was
    split,
    - the .map file now isn't created after the final binary anymore,
    - --strip-debug is passed to $(LD) during early linking passes (for
      consistency the option is also explicitly added to the optional linking
      pass rule),
    - CONFIG_{SUPPRESS_DUPLICATE_SYMBOL_WARNINGS,ENFORCE_UNIQUE_SYMBOLS} are
      now properly respected.
    Orphan section checking, otoh, is getting suppressed for now, until the
    about a dozen warnings which would result have been taken care of.
    
    While the 4th linking step continues to be avoided when possible, a
    redundant invocation of $(NM) and tools/symbols (plus the assembling of
    the resulting .S file) is hopefully deemed acceptable.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/Makefile | 40 ++++++----------------------------------
 1 file changed, 6 insertions(+), 34 deletions(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index fcd73c7a2d..511ced09ec 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -34,40 +34,12 @@ obj-y += vtimer.o
 $(TARGET): $(TARGET)-syms
 	$(OBJCOPY) -O binary -S $< $@
 
-$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
-	$(objtree)/tools/symbols $(all_symbols) --empty > $(dot-target).0.S
-	$(MAKE) $(build)=$(@D) $(dot-target).0.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	      $(dot-target).0.o -o $(dot-target).0
-	$(NM) -pa --format=sysv $(dot-target).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).1.S
-	$(MAKE) $(build)=$(@D) $(dot-target).1.o
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).1.o -o $(dot-target).1
-	$(NM) -pa --format=sysv $(dot-target).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		> $(dot-target).2.S
-	$(MAKE) $(build)=$(@D) $(dot-target).2.o
-	if ! { $(call compare-symbol-tables, $(dot-target).1.o, $(dot-target).2.o) >/dev/null; }; \
-	then \
-		set -e; \
-		$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-		    $(dot-target).2.o -o $(dot-target).2; \
-		$(NM) -pa --format=sysv $(dot-target).2 \
-			| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-			> $(dot-target).3.S; \
-		$(MAKE) $(build)=$(@D) $(dot-target).3.o; \
-		$(call compare-symbol-tables, $(dot-target).2.o, $(dot-target).3.o); \
-	else \
-		ln -sf $(dot-target).2.o $(dot-target).3.o; \
-	fi
-	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
-	    $(dot-target).3.o -o $@
-	$(NM) -pa --format=sysv $@ \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		> $@.map
-	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
+LAST_LINKING_PASS := 3
+
+include scripts/Makefile.link
+
+# Suppress orphan section checking for the time being.
+orphan-handling-y :=
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:45:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:45:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428609.1651486 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y04-0004NT-DS; Tue, 22 Sep 2026 10:45:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428609.1651486; Tue, 22 Sep 2026 10:45:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y04-0004NL-As; Tue, 22 Sep 2026 10:45:24 +0000
Received: by outflank-mailman (input) for mailman id 1428609;
 Tue, 22 Sep 2026 10:45:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8y02-0004NA-U1
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:45:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y02-00Aq6N-1p
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y02-00G3NR-2m
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=vGWaxoAxCoKXFdV6eaVJm+da2rwjrXfP7Zp6Qz/ND20=; b=Smh6ECr0oL3a5EEFBSzQE0N0jb
	QFBM+jS5bEZLw1CRmMMN4sRAufVNpqacNF3cOmLJC8of2Eu1Do7ecbB1PI/oL1R+N+PI6ePyCR46e
	I8fJpSmYqRDmBKrXWYPEx3qleki7AvLXdsHp7UVYUdkClcq3mQRT7b1ztWsbDK/3LPD4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] build: move $(all-symbols-*)
Message-Id: <E1x8y02-00G3NR-2m@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:45:22 +0000

commit 0a609dc49ac5ea51ed553a779b6766a8bdbf8e86
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:20:10 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:24 2026 +0200

    build: move $(all-symbols-*)
    
    With the final linking logic now consolidated in scripts/Makefile.link,
    $(all-symbols-*) also doesn't need setting anymore in (and passing down
    from) the top level Makefile.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/Makefile              | 7 +------
 xen/arch/x86/Makefile     | 4 ++--
 xen/scripts/Makefile.link | 8 ++++++--
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 8c56295493..52ea283f5c 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -465,10 +465,6 @@ ALL_OBJS-$(CONFIG_CRYPTO) += crypto/built_in.o
 ARCH_LIBS-y               :=
 ALL_LIBS-y                := lib/lib.a
 
-all-symbols-y :=
-all-symbols-$(CONFIG_LIVEPATCH) += --all-symbols
-all-symbols-$(CONFIG_FAST_SYMBOL_LOOKUP) += --sort-by-name
-
 include $(srctree)/arch/$(SRCARCH)/arch.mk
 
 # define new variables to avoid the ones defined in Config.mk
@@ -622,8 +618,7 @@ $(TARGET): outputmakefile asm-generic FORCE
 	$(Q)$(MAKE) $(build)=arch/$(SRCARCH) include
 	$(Q)$(MAKE) $(build)=. arch/$(SRCARCH)/include/asm/asm-offsets.h
 	$(Q)$(MAKE) $(build)=. MKRELOC=$(MKRELOC) 'ALL_OBJS=$(ALL_OBJS-y)' \
-	            'ALL_LIBS=$(ARCH_LIBS-y) $(ALL_LIBS-y)' \
-	            'all_symbols=$(all-symbols-y)' $@
+	            'ALL_LIBS=$(ARCH_LIBS-y) $(ALL_LIBS-y)' $@
 
 SUBDIRS = xsm arch common crypto drivers lib test
 define all_sources
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 8a205c3d27..2be90ea098 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -183,14 +183,14 @@ ifeq ($(XEN_BUILD_PE),y)
 	$(MKRELOC) $(filter .$(TARGET).efi.%, $^) > $@
 
 .$(TARGET).efi.0s.S:
-	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+	$(objtree)/tools/symbols $(all-symbols-y) --empty > $@
 
 .$(TARGET).efi.1s.S: .$(TARGET).efi.0
 .$(TARGET).efi.2s.S: .$(TARGET).efi.1
 
 .$(TARGET).efi.%s.S:
 	$(NM) -pa --format=sysv $< \
-	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+	  | $(objtree)/tools/symbols $(all-symbols-y) --sysv --sort \
 	    --source-name=$(TARGET).efi.S \
 	  > $@
 
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
index 4b8ae90eee..11d3fc48da 100644
--- a/xen/scripts/Makefile.link
+++ b/xen/scripts/Makefile.link
@@ -3,6 +3,10 @@
 # Helper rules for linking xen-syms
 # ==========================================================================
 
+all-symbols-y :=
+all-symbols-$(CONFIG_LIVEPATCH) += --all-symbols
+all-symbols-$(CONFIG_FAST_SYMBOL_LOOKUP) += --sort-by-name
+
 syms-warn-dup-y := --warn-dup
 syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
 syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup
@@ -17,7 +21,7 @@ final-image-check-y ?= true
 	$(call cmd,cc_o_S)
 
 .$(TARGET)-syms.0.S:
-	$(objtree)/tools/symbols $(all_symbols) --empty > $@
+	$(objtree)/tools/symbols $(all-symbols-y) --empty > $@
 
 .$(TARGET)-syms.1.S: .$(TARGET)-syms.0
 .$(TARGET)-syms.2.S: .$(TARGET)-syms.1
@@ -25,7 +29,7 @@ final-image-check-y ?= true
 
 .$(TARGET)-syms.%.S:
 	$(NM) -pa --format=sysv $< \
-	  | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+	  | $(objtree)/tools/symbols $(all-symbols-y) --sysv --sort \
 	    $(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
 	  > $@
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:45:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:45:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428611.1651491 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0E-0004Py-Ew; Tue, 22 Sep 2026 10:45:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428611.1651491; Tue, 22 Sep 2026 10:45:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0E-0004Pq-CD; Tue, 22 Sep 2026 10:45:34 +0000
Received: by outflank-mailman (input) for mailman id 1428611;
 Tue, 22 Sep 2026 10:45:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8y0D-0004Pf-1D
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:45:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0C-00Aq6q-2C
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0C-00G4F6-33
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=soXanakVdmtgB2l0dTzR5Lg7RGi6jqe7AG/LCe1Mdo8=; b=aQWzbwAVHAoLpxB2JjOXq9Qu9X
	zXQzO4TngunC4NinutVy3MCDPBLrUpGYuMVHGoV+qGth9ZGQSpYGiM/tUowtkvJNI2kmhxXSKGQVf
	wT4MwGQw9sysQcoRFK322Wv0h3bjNHJYd7LWEkIxFTZo7pOG/eZOUsf4h3lwklyruhY8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] build: move $(compare-symbol-tables)
Message-Id: <E1x8y0C-00G4F6-33@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:45:32 +0000

commit 06438aead654bb53dc500a1a7b69a38c845a895d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:20:55 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:28 2026 +0200

    build: move $(compare-symbol-tables)
    
    With the final linking logic now consolidated in scripts/Makefile.link,
    $(compare-symbol-tables) also doesn't need setting anymore in
    Kbuild.include.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
---
 xen/scripts/Kbuild.include | 13 -------------
 xen/scripts/Makefile.link  | 12 ++++++++++++
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include
index 41483513ac..c2e4ec811b 100644
--- a/xen/scripts/Kbuild.include
+++ b/xen/scripts/Kbuild.include
@@ -56,19 +56,6 @@ define filechk
 	fi
 endef
 
-###
-# Compare the symbol tables of two object files.  As diff's -I option isn't
-# standardized, the name difference of the two object files needs abstracting
-# out.
-define compare-symbol-tables
-    ln -f $(1) $(@D)/.cst.$$$$; \
-    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(1).sym; \
-    ln -f $(2) $(@D)/.cst.$$$$; \
-    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(2).sym; \
-    rm -f $(@D)/.cst.$$$$; \
-    diff -u $(1).sym $(2).sym
-endef
-
 # as-insn: Check whether assembler supports an instruction.
 # Usage: cflags-y += $(call as-insn,CC FLAGS,"insn",option-yes,option-no)
 as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \
diff --git a/xen/scripts/Makefile.link b/xen/scripts/Makefile.link
index 11d3fc48da..dda38da2c3 100644
--- a/xen/scripts/Makefile.link
+++ b/xen/scripts/Makefile.link
@@ -33,6 +33,18 @@ final-image-check-y ?= true
 	    $(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
 	  > $@
 
+# Compare the symbol tables of two object files.  As diff's -I option isn't
+# standardized, the name difference of the two object files needs abstracting
+# out.
+define compare-symbol-tables
+    ln -f $(1) $(@D)/.cst.$$$$; \
+    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(1).sym; \
+    ln -f $(2) $(@D)/.cst.$$$$; \
+    $(OBJDUMP) -t $(@D)/.cst.$$$$ > $(2).sym; \
+    rm -f $(@D)/.cst.$$$$; \
+    diff -u $(1).sym $(2).sym
+endef
+
 .$(TARGET)-syms.%: $(objtree)/prelink.o .$(TARGET)-syms.%.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
 	      $(build_id_linker) --strip-debug -o $@
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:45:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:45:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428613.1651494 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0O-0004SV-G7; Tue, 22 Sep 2026 10:45:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428613.1651494; Tue, 22 Sep 2026 10:45:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0O-0004SN-DU; Tue, 22 Sep 2026 10:45:44 +0000
Received: by outflank-mailman (input) for mailman id 1428613;
 Tue, 22 Sep 2026 10:45:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8y0N-0004SC-48
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:45:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0M-00Aq7I-2U
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0N-00G58Q-0E
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sYEcqifdJwfsEcqTsgPSnAsFmFeBDS1UYdQhNSnvPPo=; b=dKTA6XpjiS2IE972hQIgMLLGWD
	CVmmDHBYI0QdGlqdxnld8SS9pjmdvQVtx+ztR0GDFFiS34g+RRNV8U5W8/Pjxf0t9vGJsxd0bs4xj
	1LQVSa8DWU1pfWNQwPBFW7vaiY52bA4a28v+8XfrAoOXaX6SnD/B7zbbsb7tAswQLyzw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] vmx: Handle TDX instruction exit reasons
Message-Id: <E1x8y0N-00G58Q-0E@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:45:43 +0000

commit 755c9fbbfe4bcd8671a6621ae050f45441300579
Author:     Teddy Astie <teddy.astie@vates.tech>
AuthorDate: Tue Sep 22 09:22:12 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:37 2026 +0200

    vmx: Handle TDX instruction exit reasons
    
    On hardware that supports TDX, guests can cause VMEXIT related to
    TDX instructions (SEAMCALL and TDCALL) regardless of VMCS configuration.
    
    Currently, that causes the domain to crash when a domain tries to
    use these instructions in kernel-mode, and emit #UD when used in user-mode.
    
    Adjust the behavior so that the guest always gets #UD when trying to
    use these instructions regardless of the privilege level that the vCPU
    is running.
    
    In the nested virtualization case, also reinject the exit reason to L1
    rather than failing on "Unhandled nested vmexit" (leading to a L1 crash
    that can be caused by L2 by executing one of the TDX instructions).
    
    Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/vmx/vmx.c             | 2 ++
 xen/arch/x86/hvm/vmx/vvmx.c            | 2 ++
 xen/arch/x86/include/asm/hvm/vmx/vmx.h | 2 ++
 xen/arch/x86/include/asm/perfc_defn.h  | 2 +-
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 7fa404878a..181aecc2fb 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -4681,6 +4681,8 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
     case EXIT_REASON_MWAIT_INSTRUCTION:
     case EXIT_REASON_MONITOR_INSTRUCTION:
     case EXIT_REASON_GETSEC:
+    case EXIT_REASON_SEAMCALL:
+    case EXIT_REASON_TDCALL:
         /*
          * We should never exit on GETSEC because CR4.SMXE is always 0 when
          * running in guest context, and the CPU checks that before getting
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index e2407f07c2..dd34fea6d9 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2497,6 +2497,8 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
     case EXIT_REASON_INVEPT:
     case EXIT_REASON_XSETBV:
     case EXIT_REASON_INVVPID:
+    case EXIT_REASON_SEAMCALL:
+    case EXIT_REASON_TDCALL:
         /* inject to L1 */
         nvcpu->nv_vmexit_pending = 1;
         break;
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
index 713d0900a9..b7b8bc0c84 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
@@ -201,6 +201,8 @@ static inline void pi_clear_sn(struct pi_desc *pi_desc)
 #define EXIT_REASON_XRSTORS             64
 #define EXIT_REASON_BUS_LOCK            74
 #define EXIT_REASON_NOTIFY              75
+#define EXIT_REASON_SEAMCALL            76
+#define EXIT_REASON_TDCALL              77
 /* Remember to also update VMX_PERF_EXIT_REASON_SIZE! */
 
 /*
diff --git a/xen/arch/x86/include/asm/perfc_defn.h b/xen/arch/x86/include/asm/perfc_defn.h
index ac7439b992..102b9be6ef 100644
--- a/xen/arch/x86/include/asm/perfc_defn.h
+++ b/xen/arch/x86/include/asm/perfc_defn.h
@@ -6,7 +6,7 @@ PERFCOUNTER_ARRAY(exceptions,           "exceptions", 32)
 
 #ifdef CONFIG_HVM
 
-#define VMX_PERF_EXIT_REASON_SIZE 76
+#define VMX_PERF_EXIT_REASON_SIZE 78
 #define VMEXIT_NPF_PERFC 166
 #define SVM_PERF_EXIT_REASON_SIZE (VMEXIT_NPF_PERFC + 1)
 PERFCOUNTER_ARRAY(vmexits,              "vmexits",
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:45:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:45:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428614.1651498 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0X-0004VS-Ig; Tue, 22 Sep 2026 10:45:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428614.1651498; Tue, 22 Sep 2026 10:45:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0X-0004VK-G7; Tue, 22 Sep 2026 10:45:53 +0000
Received: by outflank-mailman (input) for mailman id 1428614;
 Tue, 22 Sep 2026 10:45:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8y0X-0004VB-6Z
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:45:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0W-00Aq7r-2k
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0X-00G5yR-0U
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:45:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=H2rqod+Dq7Ajcgmg/5Udz+JAqtHBC12hCgN6rg+NfM0=; b=phEGbr2io7dAM7y9dsclU/Dcw6
	CFC8v6IUgOtA1kt/2GlI9KhakkOiC8SjEGexlRmB50t1pK96hYlrhxQzw84iXrEWXf5JSLDLwQxlR
	2HlLsLLaQ+/bxXXkfW3GdW3neTVARe5fyrwWE+GOKVDn7rXxbui+ORh/pU6MPtsw7tYw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/vpmu: Fix incorrect printk format specifiers
Message-Id: <E1x8y0X-00G5yR-0U@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:45:53 +0000

commit cfd4e99d18d02cfbcf2e77d10be6eb5928662f33
Author:     Alejandro Vallejo <alejandro.garciavallejo@amd.com>
AuthorDate: Tue Sep 22 09:22:54 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:43 2026 +0200

    x86/vpmu: Fix incorrect printk format specifiers
    
    The patch in Fixes adjusted two vendor variables from uint8_t and plain
    int to to unsigned int. But they were both used later in printks with
    the %d specifier rather than %u. Adjust accordingly.
    
    Fixes: 39a9a49449d7 ("x86: Remove x86 prefixed names from x86/cpu/ files")
    Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/cpu/vpmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
index 470f5ec98d..e0f7edded3 100644
--- a/xen/arch/x86/cpu/vpmu.c
+++ b/xen/arch/x86/cpu/vpmu.c
@@ -417,7 +417,7 @@ static int vpmu_arch_initialise(struct vcpu *v)
     {
         if ( vpmu_mode != XENPMU_MODE_OFF )
         {
-            printk(XENLOG_G_WARNING "VPMU: Unknown CPU vendor %d. "
+            printk(XENLOG_G_WARNING "VPMU: Unknown CPU vendor %u. "
                    "Disabling VPMU\n", vendor);
             opt_vpmu_enabled = 0;
             vpmu_mode = XENPMU_MODE_OFF;
@@ -849,7 +849,7 @@ static int __init cf_check vpmu_init(void)
 #endif
 
     default:
-        printk(XENLOG_WARNING "VPMU: Unknown CPU vendor: %d. "
+        printk(XENLOG_WARNING "VPMU: Unknown CPU vendor: %u. "
                "Turning VPMU off.\n", vendor);
         break;
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:46:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:46:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428615.1651503 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0i-0004Y2-K4; Tue, 22 Sep 2026 10:46:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428615.1651503; Tue, 22 Sep 2026 10:46:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0i-0004Xu-HS; Tue, 22 Sep 2026 10:46:04 +0000
Received: by outflank-mailman (input) for mailman id 1428615;
 Tue, 22 Sep 2026 10:46:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8y0h-0004Xj-AS
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:46:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0g-00Aq8k-37
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:46:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0h-00G6hm-0o
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:46:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=gPVSa8h9Oe4U4Efko4RVcLs//dBaILd8j5OIzLboGUo=; b=R9rqOhyT6+DwWGv4Oetxl510HR
	SGbyemGguhUjDMeMbnnO2YLwueNMgY5ZAKfvgDhgjTLn47IVh/hf58MXHoPGE9Zgd0LV/5ZxIE1vX
	8+R6udn7+eZeTdsYDLcEHDtYWTwDcWpNQJHBry2HnVyGEXurIrWVO6uXI/C2DPh5KF6w=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/HVM: replace paging_mode_hap() uses
Message-Id: <E1x8y0h-00G6hm-0o@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:46:03 +0000

commit 8d70af242d7ab641504c5c2932bd82245f817fca
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Sep 22 09:23:57 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Sep 22 09:59:48 2026 +0200

    x86/HVM: replace paging_mode_hap() uses
    
    HVM guests cannot run without either HAP or shadow enabled. While
    paging_mode_shadow() is compile-time-constant when SHADOW_PAGING=n,
    paging_mode_hap() isn't. Hence the former is preferred to leverage DCE.
    
    In svm_update_guest_cr() combine two adjacent conditionals.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/arch/x86/hvm/dom0_build.c    |  2 +-
 xen/arch/x86/hvm/svm/nestedsvm.c | 12 ++++++------
 xen/arch/x86/hvm/svm/svm.c       | 13 ++++++-------
 xen/arch/x86/hvm/svm/vmcb.c      |  2 +-
 xen/arch/x86/hvm/vmx/vmcs.c      | 12 ++++++------
 xen/arch/x86/hvm/vmx/vmx.c       | 14 +++++++-------
 xen/arch/x86/hvm/vmx/vvmx.c      |  2 +-
 7 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index aa06cdb2f7..881e8e21b0 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -473,7 +473,7 @@ static int __init pvh_populate_p2m(struct domain *d)
         }
     }
 
-    if ( using_vmx() && paging_mode_hap(d) && !vmx_unrestricted_guest(v) )
+    if ( using_vmx() && !paging_mode_shadow(d) && !vmx_unrestricted_guest(v) )
     {
         /*
          * Since Dom0 cannot be migrated, we will only setup the
diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
index a8b15d6eae..81579370b8 100644
--- a/xen/arch/x86/hvm/svm/nestedsvm.c
+++ b/xen/arch/x86/hvm/svm/nestedsvm.c
@@ -8,7 +8,7 @@
 #include <asm/hvm/support.h>
 #include <asm/hvm/svm.h>
 #include <asm/hvm/nestedhvm.h>
-#include <asm/paging.h> /* paging_mode_hap */
+#include <asm/paging.h> /* paging_mode_(hap|shadow)() */
 #include <asm/event.h> /* for local_event_delivery_(en|dis)able */
 #include <asm/p2m.h> /* p2m_get_pagetable, p2m_get_nestedp2m */
 #include <asm/x86_emulate.h>
@@ -243,7 +243,7 @@ static int nsvm_vcpu_hostrestore(struct vcpu *v, struct cpu_user_regs *regs)
         /* host nested paging + guest nested paging. */
         /* hvm_set_cr3() below sets v->arch.hvm.guest_cr[3] for us. */
     }
-    else if ( paging_mode_hap(v->domain) )
+    else if ( !paging_mode_shadow(v->domain) )
     {
         /* host nested paging + guest shadow paging. */
         /* hvm_set_cr3() below sets v->arch.hvm.guest_cr[3] for us. */
@@ -525,7 +525,7 @@ static int nsvm_vmcb_prepare4vmrun(struct vcpu *v, struct cpu_user_regs *regs)
         if ( rc != X86EMUL_OKAY )
             gdprintk(XENLOG_ERR, "hvm_set_cr3 failed, rc: %u\n", rc);
     }
-    else if ( paging_mode_hap(v->domain) )
+    else if ( !paging_mode_shadow(v->domain) )
     {
         /* host nested paging + guest shadow paging. */
         vmcb_set_np(n2vmcb, true);
@@ -1033,7 +1033,7 @@ nsvm_vmcb_prepare4vmexit(struct vcpu *v, struct cpu_user_regs *regs)
          * unshadowed guest h_cr3 is kept in ns_vmcb->h_cr3,
          * hence we keep the ns_vmcb->h_cr3 value. */
     }
-    else if ( paging_mode_hap(v->domain) )
+    else if ( !paging_mode_shadow(v->domain) )
     {
         /* host nested paging + guest shadow paging. */
         vmcb_set_np(ns_vmcb, false);
@@ -1260,7 +1260,7 @@ nestedsvm_check_intercepts(struct vcpu *v, struct cpu_user_regs *regs,
             /* host nested paging + guest nested paging */
             return NESTEDHVM_VMEXIT_HOST;
         }
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             if ( is_intercepted )
                 return NESTEDHVM_VMEXIT_FATALERROR;
@@ -1559,7 +1559,7 @@ void svm_nested_features_on_efer_update(struct vcpu *v)
     if ( nsvm_efer_svm_enabled(v) )
     {
         if ( !vmcb->virt_ext.fields.vloadsave_enable &&
-             paging_mode_hap(v->domain) &&
+             !paging_mode_shadow(v->domain) &&
              cpu_has_svm_vloadsave )
         {
             vmcb->virt_ext.fields.vloadsave_enable = 1;
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index e6a0edcf71..71e48351f2 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -113,7 +113,8 @@ static void cf_check svm_update_guest_cr(
     switch ( cr )
     {
     case 0:
-        if ( paging_mode_hap(v->domain) )
+        value = v->arch.hvm.guest_cr[0];
+        if ( !paging_mode_shadow(v->domain) )
         {
             uint32_t intercepts = vmcb_get_cr_intercepts(vmcb);
 
@@ -122,9 +123,7 @@ static void cf_check svm_update_guest_cr(
                  monitor_ctrlreg_bitmask(VM_EVENT_X86_CR3) )
                vmcb_set_cr_intercepts(vmcb, intercepts | CR_INTERCEPT_CR3_WRITE);
         }
-
-        value = v->arch.hvm.guest_cr[0];
-        if ( paging_mode_shadow(v->domain) )
+        else
             value |= X86_CR0_PG | X86_CR0_WP;
         vmcb_set_cr0(vmcb, value);
         break;
@@ -148,7 +147,7 @@ static void cf_check svm_update_guest_cr(
         break;
     case 4:
         value = HVM_CR4_HOST_MASK;
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
             value &= ~X86_CR4_PAE;
         value |= v->arch.hvm.guest_cr[4];
 
@@ -418,7 +417,7 @@ static int svm_vmcb_restore(struct vcpu *v, struct hvm_hw_cpu *c)
     svm_update_guest_cr(v, 0, 0);
     svm_update_guest_cr(v, 4, 0);
 
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         vmcb_set_np(vmcb, true);
         vmcb_set_g_pat(vmcb, MSR_IA32_CR_PAT_RESET /* guest PAT */);
@@ -2519,7 +2518,7 @@ void asmlinkage svm_vmexit_handler(void)
         regs, !(vmcb_get_efer(vmcb) & EFER_LMA) || !(vmcb->cs.l));
 
     v->arch.hvm.guest_cr[2] = vmcb_get_cr2(vmcb);
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         v->arch.hvm.guest_cr[0] = vmcb_get_cr0(vmcb);
         v->arch.hvm.guest_cr[3] = v->arch.hvm.hw_cr[3] = vmcb_get_cr3(vmcb);
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index d069280a4d..a6f09672a7 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -143,7 +143,7 @@ static int construct_vmcb(struct vcpu *v)
 
     vmcb->_exception_intercepts = HVM_TRAP_MASK;
 
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         vmcb_set_np(vmcb, true); /* enable nested paging */
         vmcb->_g_pat = MSR_IA32_CR_PAT_RESET; /* guest PAT */
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 8e52ef4d49..8ec7ae7403 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -1141,7 +1141,7 @@ static int construct_vmcs(struct vcpu *v)
           SECONDARY_EXEC_ENABLE_VM_FUNCTIONS |
           SECONDARY_EXEC_ENABLE_VIRT_EXCEPTIONS);
 
-    if ( paging_mode_hap(d) )
+    if ( !paging_mode_shadow(d) )
     {
         v->arch.hvm.vmx.exec_control &= ~(CPU_BASED_INVLPG_EXITING |
                                           CPU_BASED_CR3_LOAD_EXITING |
@@ -1203,7 +1203,7 @@ static int construct_vmcs(struct vcpu *v)
         vmx_clear_msr_intercept(v, MSR_IA32_SYSENTER_CS, VMX_MSR_RW);
         vmx_clear_msr_intercept(v, MSR_IA32_SYSENTER_ESP, VMX_MSR_RW);
         vmx_clear_msr_intercept(v, MSR_IA32_SYSENTER_EIP, VMX_MSR_RW);
-        if ( paging_mode_hap(d) && (!is_iommu_enabled(d) || iommu_snoop) )
+        if ( !paging_mode_shadow(d) && (!is_iommu_enabled(d) || iommu_snoop) )
             vmx_clear_msr_intercept(v, MSR_IA32_CR_PAT, VMX_MSR_RW);
         if ( (vmexit_ctl & VM_EXIT_CLEAR_BNDCFGS) &&
              (vmentry_ctl & VM_ENTRY_LOAD_BNDCFGS) )
@@ -1326,8 +1326,8 @@ static int construct_vmcs(struct vcpu *v)
     __vmwrite(GUEST_DR7, 0);
     __vmwrite(VMCS_LINK_POINTER, ~0UL);
 
-    v->arch.hvm.vmx.exception_bitmap = HVM_TRAP_MASK
-              | (paging_mode_hap(d) ? 0 : (1U << X86_EXC_PF));
+    v->arch.hvm.vmx.exception_bitmap = HVM_TRAP_MASK |
+        (!paging_mode_shadow(d) ? 0 : (1U << X86_EXC_PF));
 
     if ( cpu_has_vmx_notify_vm_exiting )
         __vmwrite(NOTIFY_WINDOW, vm_notify_window);
@@ -1347,7 +1347,7 @@ static int construct_vmcs(struct vcpu *v)
         __vmwrite(TPR_THRESHOLD, 0);
     }
 
-    if ( paging_mode_hap(d) )
+    if ( !paging_mode_shadow(d) )
     {
         struct p2m_domain *p2m = p2m_get_hostp2m(d);
         struct ept_data *ept = &p2m->ept;
@@ -1377,7 +1377,7 @@ static int construct_vmcs(struct vcpu *v)
 
     vmx_vlapic_msr_changed(v);
 
-    if ( opt_l1d_flush && paging_mode_hap(d) )
+    if ( opt_l1d_flush && !paging_mode_shadow(d) )
         rc = vmx_add_msr(v, MSR_FLUSH_CMD, FLUSH_CMD_L1D,
                          VMX_MSR_GUEST_LOADONLY);
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 181aecc2fb..6237623a4c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1707,7 +1707,7 @@ static void cf_check vmx_update_guest_cr(
         if ( paging_mode_shadow(v->domain) )
             hw_cr0_mask |= X86_CR0_WP;
 
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             /* Manage GUEST_CR3 when CR0.PE=0. */
             uint32_t old_ctls = v->arch.hvm.vmx.exec_control;
@@ -1772,7 +1772,7 @@ static void cf_check vmx_update_guest_cr(
         /* Fallthrough: Changing CR0 can change some bits in real CR4. */
     case 4:
         v->arch.hvm.hw_cr[4] = HVM_CR4_HOST_MASK;
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
             v->arch.hvm.hw_cr[4] &= ~X86_CR4_PAE;
 
         if ( !nestedhvm_vcpu_in_guestmode(v) )
@@ -1792,7 +1792,7 @@ static void cf_check vmx_update_guest_cr(
              * two subtly complicated cases.
              */
 
-            if ( paging_mode_hap(v->domain) )
+            if ( !paging_mode_shadow(v->domain) )
             {
                 /*
                  * On hardware lacking the Unrestricted Guest feature (or with
@@ -1824,7 +1824,7 @@ static void cf_check vmx_update_guest_cr(
          * unconditionally trapping more CR4 bits, at which point the
          * performance benefit of doing this is quite dubious.
          */
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             /*
              * Update CR4 host mask to only trap when the guest tries to set
@@ -1860,7 +1860,7 @@ static void cf_check vmx_update_guest_cr(
         break;
 
     case 3:
-        if ( paging_mode_hap(v->domain) )
+        if ( !paging_mode_shadow(v->domain) )
         {
             if ( !hvm_paging_enabled(v) && !vmx_unrestricted_guest(v) )
                 v->arch.hvm.hw_cr[3] =
@@ -4190,7 +4190,7 @@ void asmlinkage vmx_vmexit_handler(struct cpu_user_regs *regs)
 
     hvm_sanitize_regs_fields(regs, !(cs_ar_bytes & X86_SEG_AR_CS_LM_ACTIVE));
 
-    if ( paging_mode_hap(v->domain) )
+    if ( !paging_mode_shadow(v->domain) )
     {
         /*
          * Xen allows the guest to modify some CR4 bits directly, update cached
@@ -4979,7 +4979,7 @@ bool asmlinkage vmx_vmenter_helper(const struct cpu_user_regs *regs)
     if ( unlikely(need_flush) )
         vpid_sync_all();
 
-    if ( paging_mode_hap(curr->domain) )
+    if ( !paging_mode_shadow(curr->domain) )
     {
         struct ept_data *ept = &p2m_get_hostp2m(currd)->ept;
         unsigned int cpu = smp_processor_id();
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index dd34fea6d9..82273b6612 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2458,7 +2458,7 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
          */
         if ( vector == X86_EXC_PF )
         {
-            if ( paging_mode_hap(v->domain) )
+            if ( !paging_mode_shadow(v->domain) )
                 nvcpu->nv_vmexit_pending = 1;
         }
         else if ( (intr_info & valid_mask) == valid_mask )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 10:46:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 10:46:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428616.1651506 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0s-0004a9-LP; Tue, 22 Sep 2026 10:46:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428616.1651506; Tue, 22 Sep 2026 10:46:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8y0s-0004a1-Ip; Tue, 22 Sep 2026 10:46:14 +0000
Received: by outflank-mailman (input) for mailman id 1428616;
 Tue, 22 Sep 2026 10:46:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8y0r-0004Zs-Nr
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 10:46:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0r-00Aq9I-1F
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:46:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8y0r-00G7Q4-2C
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 10:46:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zssYrJNU3sPx/DmGMvoGZQ7No7oaiIc/JzEZyboZU/c=; b=tlNn+CrZz6ei7N5CD6bofaRduu
	DxMxI7XcGG17Xa+viyu+6vd1JOoNMluTFZMoFyA1rEIgGWrSGuq1LII1xLA5/6/ojXgyjuU5B/Dsr
	ufGIPM1Rwx7w4tjD4cqfImMERif/D/CccdWeENFcgwXvZH2dsqjFlUQZk9/BBpdApCSQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] tools/libxenguest: remove Mini-OS specific parts
Message-Id: <E1x8y0r-00G7Q4-2C@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 10:46:13 +0000

commit 487f7e945a9a31ba15e107843efe8a382109aacf
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Tue Sep 22 09:27:08 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 22 11:36:15 2026 +0100

    tools/libxenguest: remove Mini-OS specific parts
    
    The last Mini-OS use case of libxenguest is gone, so remove the
    Mini-OS specific parts of libxenguest.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/libs/guest/Makefile.common                  | 15 -------
 tools/libs/guest/xg_dom_decompress_unsafe.c       | 48 -----------------------
 tools/libs/guest/xg_dom_decompress_unsafe.h       | 28 -------------
 tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c | 14 -------
 tools/libs/guest/xg_dom_decompress_unsafe_lz4.c   | 39 ------------------
 tools/libs/guest/xg_dom_decompress_unsafe_lzma.c  | 14 -------
 tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c | 44 ---------------------
 tools/libs/guest/xg_dom_decompress_unsafe_xz.c    | 46 ----------------------
 tools/libs/guest/xg_dom_decompress_unsafe_zstd.c  | 44 ---------------------
 9 files changed, 292 deletions(-)

diff --git a/tools/libs/guest/Makefile.common b/tools/libs/guest/Makefile.common
index 86b1f160e5..47b3a52360 100644
--- a/tools/libs/guest/Makefile.common
+++ b/tools/libs/guest/Makefile.common
@@ -1,8 +1,3 @@
-ifeq ($(CONFIG_LIBXC_MINIOS),y)
-# Save/restore of a domain is currently incompatible with a stubdom environment
-override CONFIG_MIGRATE := n
-endif
-
 OBJS-y += xg_private.o
 OBJS-y += xg_domain.o
 OBJS-y += xg_suspend.o
@@ -55,16 +50,6 @@ OBJS-$(CONFIG_X86)     += xg_dom_x86.o
 OBJS-$(CONFIG_X86)     += xg_cpuid_x86.o
 OBJS-$(CONFIG_ARM)     += xg_dom_arm.o
 
-ifeq ($(CONFIG_LIBXC_MINIOS),y)
-OBJS-y                 += xg_dom_decompress_unsafe.o
-OBJS-y                 += xg_dom_decompress_unsafe_bzip2.o
-OBJS-y                 += xg_dom_decompress_unsafe_lz4.o
-OBJS-y                 += xg_dom_decompress_unsafe_lzma.o
-OBJS-y                 += xg_dom_decompress_unsafe_lzo1x.o
-OBJS-y                 += xg_dom_decompress_unsafe_xz.o
-OBJS-y                 += xg_dom_decompress_unsafe_zstd.o
-endif
-
 CFLAGS += -D__XEN_TOOLS__
 CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += -iquote ../../../xen/common/libelf
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe.c b/tools/libs/guest/xg_dom_decompress_unsafe.c
deleted file mode 100644
index 21d964787d..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-static struct xc_dom_image *unsafe_dom;
-static unsigned char *output_blob;
-static unsigned int output_size;
-
-static void unsafe_error(const char *msg)
-{
-    xc_dom_panic(unsafe_dom->xch, XC_INVALID_KERNEL, "%s", msg);
-}
-
-static int unsafe_flush(void *src, unsigned int size)
-{
-    void *n = realloc(output_blob, output_size + size);
-    if (!n)
-        return -1;
-    output_blob = n;
-
-    memcpy(&output_blob[output_size], src, size);
-    output_size += size;
-    return size;
-}
-
-int xc_dom_decompress_unsafe(
-    decompress_fn fn, struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    int ret;
-
-    unsafe_dom = dom;
-    output_blob = NULL;
-    output_size = 0;
-
-    ret = fn(dom->kernel_blob, dom->kernel_size, NULL, unsafe_flush, NULL, NULL, unsafe_error);
-
-    if (ret)
-        free(output_blob);
-    else {
-        *blob = output_blob;
-        *size = output_size;
-    }
-
-    return ret;
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe.h b/tools/libs/guest/xg_dom_decompress_unsafe.h
deleted file mode 100644
index 5bc2222076..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifdef __MINIOS__
-# include "../../xen/include/xen/decompress.h"
-#else
-typedef int decompress_fn(unsigned char *inbuf, unsigned int len,
-                          int (*fill)(void*, unsigned int),
-                          int (*flush)(void*, unsigned int),
-                          unsigned char *outbuf, unsigned int *posp,
-                          void (*error)(const char *x));
-#endif
-
-#define cf_check /* No Control Flow Integriy checking */
-
-int xc_dom_decompress_unsafe(
-    decompress_fn fn, struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-
-int xc_try_bzip2_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_lz4_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_lzma_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_lzo1x_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_xz_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_zstd_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c b/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c
deleted file mode 100644
index 9d3709e6cc..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-#include "../../xen/common/bunzip2.c"
-
-int xc_try_bzip2_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(bunzip2, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c b/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c
deleted file mode 100644
index 405143aa61..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <stdint.h>
-
-#include INCLUDE_ENDIAN_H
-
-#define XG_NEED_UNALIGNED
-#include "xg_private.h"
-#include "xg_dom_decompress.h"
-
-#define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-
-#define likely(a) a
-#define unlikely(a) a
-
-static inline uint16_t le16_to_cpu(uint16_t v)
-{
-#if BYTE_ORDER == BIG_ENDIAN
-    return __builtin_bswap16(v);
-#else
-    return v;
-#endif
-}
-
-#include "../../xen/include/xen/lz4.h"
-#include "../../xen/common/decompress.h"
-#include "../../xen/common/unlz4.c"
-
-int xc_try_lz4_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unlz4, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c
deleted file mode 100644
index 5d178f0c43..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-#include "../../xen/common/unlzma.c"
-
-int xc_try_lzma_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unlzma, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
deleted file mode 100644
index 356f228718..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include INCLUDE_ENDIAN_H
-#include <stdint.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-typedef uint8_t u8;
-typedef uint32_t u32;
-typedef uint16_t u16;
-typedef uint64_t u64;
-
-#define likely(a) a
-#define noinline
-#define unlikely(a) a
-
-static inline uint16_t be16_to_cpu(const uint16_t v)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-	return __builtin_bswap16(v);
-#else
-	return v;
-#endif
-}
-
-static inline uint32_t be32_to_cpu(const uint32_t v)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-	return __builtin_bswap32(v);
-#else
-	return v;
-#endif
-}
-
-#include "../../xen/common/lzo.c"
-#include "../../xen/common/unlzo.c"
-
-int xc_try_lzo1x_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unlzo, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
deleted file mode 100644
index 0501f7f693..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdio.h>
-#include INCLUDE_ENDIAN_H
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-// TODO
-#define XZ_DEC_X86
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint32_t __le32;
-
-static inline uint32_t cpu_to_le32(const uint32_t v)
-{
-#if BYTE_ORDER == BIG_ENDIAN
-	return __builtin_bswap32(v);
-#else
-	return v;
-#endif
-}
-
-static inline uint32_t le32_to_cpu(const uint32_t v)
-{
-#if BYTE_ORDER == BIG_ENDIAN
-	return __builtin_bswap32(v);
-#else
-	return v;
-#endif
-}
-
-#define __force
-#define always_inline
-
-#include "../../xen/common/unxz.c"
-
-int xc_try_xz_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unxz, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
deleted file mode 100644
index 319816a390..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-#include INCLUDE_ENDIAN_H
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-typedef uint8_t u8;
-
-typedef uint16_t __u16;
-typedef uint32_t __u32;
-typedef uint64_t __u64;
-
-typedef uint16_t __le16;
-typedef uint32_t __le32;
-typedef uint64_t __le64;
-
-typedef uint16_t __be16;
-typedef uint32_t __be32;
-typedef uint64_t __be64;
-
-#define attr_const
-#define __force
-#define always_inline
-#define noinline
-#define __packed __attribute__((__packed__))
-
-#undef ERROR
-
-#define __TYPES_H__ /* xen/types.h guard */
-#include "../../xen/include/xen/byteorder.h"
-#include "../../xen/include/xen/unaligned.h"
-#include "../../xen/include/xen/xxhash.h"
-#include "../../xen/lib/xxhash64.c"
-#include "../../xen/common/unzstd.c"
-
-int xc_try_zstd_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unzstd, dom, blob, size);
-}
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:55:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:55:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428722.1651610 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5T-0004w4-Ty; Tue, 22 Sep 2026 11:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428722.1651610; Tue, 22 Sep 2026 11:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5T-0004vw-RE; Tue, 22 Sep 2026 11:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1428722;
 Tue, 22 Sep 2026 11:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z5S-0004vm-LF
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5S-00Aw3R-05
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5S-0045Pe-10
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ShYJ4HGtrw6mh1kHonhclEPkil4tFrMKqTgzQNOPxag=; b=ZWK59qduu4hba43LsZvbgCRZ3Y
	uFvGVbUH+AThXwmFZ0kZ1v25FC9KafsTuJl4RIGN8YwnEWr5Np+fKNC7IX/V0hz+Z0cu1n+imt1FB
	qwxROwJi1nrcogCuq4WmiON1gY5fl39oUf1Si2q+EClBU8n04qVQ9/OPnvUiedunNikw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/arm: mask debug exceptions in initial AArch64 guest state
Message-Id: <E1x8z5S-0045Pe-10@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:55:02 +0000

commit 353665b48b7aefb88c06ddf344ebcd229d2642c0
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Fri Jun 19 20:37:38 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: mask debug exceptions in initial AArch64 guest state
    
    PSR_GUEST64_INIT currently masks SError, IRQ and FIQ, but leaves debug
    exceptions unmasked. Both the AArch64 Linux boot protocol and PSCI entry
    requirements expect PSTATE.DAIF to be masked.
    
    Add PSR_DBG_MASK to PSR_GUEST64_INIT. This fixes the initial AArch64 guest
    entry state as well as virtual PSCI CPU_ON and SYSTEM_SUSPEND resume entry.
    
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    (cherry picked from commit ad8663a75aa8db4255d6690bfc210d559edc9f5b)
---
 xen/include/public/arch-arm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index b31324f8d4..34e20f5471 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -413,7 +413,8 @@ typedef uint64_t xen_callback_t;
  * zImage kernels on aarch32.
  */
 #define PSR_GUEST32_INIT (PSR_Z|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+#define PSR_GUEST64_INIT \
+    (PSR_DBG_MASK|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
 
 #define SCTLR_GUEST_INIT    xen_mk_ullong(0x00c50078)
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428723.1651614 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5d-0004yC-VQ; Tue, 22 Sep 2026 11:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428723.1651614; Tue, 22 Sep 2026 11:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5d-0004y3-So; Tue, 22 Sep 2026 11:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1428723;
 Tue, 22 Sep 2026 11:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z5c-0004xs-Fh
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5c-00Aw4J-0Q
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5c-0046Gg-1K
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=CNLXZWjzLPO7KkS+BaBVConZsyU6lQIGSgjSrIyTVBk=; b=H+HBu8tqq9Aa78QeUjsnVEp4Kz
	EWZM9E/Owph3qblIeWt1FKWrFuPQIHe8p0DIey8zEymX3aEKgzXDQiI9oAHPj02+OPkiTxJfeGWqt
	yewD/tfh0ZACJW9dIbfKRYO8NwHwSmZd3BGGGDbTnR1Xmm+K4L0Zb6WNm4TASvSN172U=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
Message-Id: <E1x8z5c-0046Gg-1K@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:55:12 +0000

commit d4fa0a7a037b4648e779506ab1e44b6c73886ef7
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Aug 5 14:11:24 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
    
    process_domain_node() parses "xen,static-mem" regardless of
    CONFIG_STATIC_MEMORY. With the feature off, init_staticmem_pages() is a
    no-op stub, so boot carries on until construct_domU() reaches the
    ASSERT_UNREACHABLE() stubs of allocate_static_memory() /
    assign_static_memory_11(): a debug build trips the assertion, a production
    build gives the domain no memory at all.
    
    Bail out at parse time instead, like process_shm_node() already does for
    CONFIG_STATIC_SHM.
    
    Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
    (cherry picked from commit e888192d133eeec8a94275eaf4194117f198a7e2)
---
 xen/common/device-tree/bootinfo-fdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/common/device-tree/bootinfo-fdt.c b/xen/common/device-tree/bootinfo-fdt.c
index 272b5a6c0a..ca64daf4cd 100644
--- a/xen/common/device-tree/bootinfo-fdt.c
+++ b/xen/common/device-tree/bootinfo-fdt.c
@@ -349,6 +349,12 @@ static int __init process_domain_node(const void *fdt, int node,
         /* No "xen,static-mem" present. */
         return 0;
 
+    if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
+    {
+        printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n");
+        return -EINVAL;
+    }
+
     return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells,
                                    size_cells, bootinfo_get_reserved_mem(),
                                    MEMBANK_STATIC_DOMAIN);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:55:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:55:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428724.1651618 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5o-00050W-0W; Tue, 22 Sep 2026 11:55:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428724.1651618; Tue, 22 Sep 2026 11:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5n-00050O-U9; Tue, 22 Sep 2026 11:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1428724;
 Tue, 22 Sep 2026 11:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z5m-00050D-Iw
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5m-00Aw5B-0k
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5m-00478E-1f
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=SllPoZKL5qwasKOaF9KAFmi6eq38mrW7yI+K5XtPyK0=; b=gbnaorPp2wWfnY7O/F/9L3TQtL
	I30qoRj0HShkwbpOYI7lLy4EdTccbQA/5HWJ9gytEYT9uYIdpDOoHJ87/HQM4BbbDh/la5kyNo4EY
	d/4y9FsUSl96sD+963zcyo7hl/aAd6XGhJulUVSffCOA4JGsCvkafWVDNc5c/QhFTRwM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/arm: propagate secondary GIC initialization failures
Message-Id: <E1x8z5m-00478E-1f@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:55:22 +0000

commit 86edcfb3248d60e5ebd14a9f3cf88c3b205edbaa
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Mon Aug 10 22:41:46 2026 +0300
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: propagate secondary GIC initialization failures
    
    The GICv3 secondary_init() callback can fail while discovering or
    waking a Redistributor, enabling LPIs, or setting up an ITS collection.
    gic_init_secondary_cpu() currently discards that status. start_secondary()
    then marks the CPU online even though its per-CPU GIC interface may be
    unusable.
    
    Return the callback status through the common GIC layer. Have
    start_secondary() report the failure and stop the affected CPU before it
    updates system features or is added to cpu_online_map.
    
    Fixes: bc183a0235e0 ("xen/arm: Add support for GIC v3")
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit 0102b592f46ff3f0784e693efa0b812551345271)
---
 xen/arch/arm/gic.c             | 10 ++++++++--
 xen/arch/arm/include/asm/gic.h |  2 +-
 xen/arch/arm/smpboot.c         | 11 +++++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 260ee64cca..365855769c 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -282,11 +282,17 @@ void smp_send_state_dump(unsigned int cpu)
 }
 
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
-void gic_init_secondary_cpu(void)
+int gic_init_secondary_cpu(void)
 {
-    gic_hw_ops->secondary_init();
+    int rc = gic_hw_ops->secondary_init();
+
+    if ( rc )
+        return rc;
+
     /* Clear LR mask for secondary cpus */
     clear_cpu_lr_mask();
+
+    return 0;
 }
 
 /* Shut down the per-CPU GIC interface */
diff --git a/xen/arch/arm/include/asm/gic.h b/xen/arch/arm/include/asm/gic.h
index 8ea256ecc6..992eb590dd 100644
--- a/xen/arch/arm/include/asm/gic.h
+++ b/xen/arch/arm/include/asm/gic.h
@@ -291,7 +291,7 @@ extern void gic_preinit(void);
 /* Bring up the interrupt controller, and report # cpus attached */
 extern void gic_init(void);
 /* Bring up a secondary CPU's per-CPU GIC interface */
-extern void gic_init_secondary_cpu(void);
+extern int gic_init_secondary_cpu(void);
 /* Take down a CPU's per-CPU GIC interface */
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index ba5fd2dd52..1806c47a08 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -319,6 +319,7 @@ smp_prepare_cpus(void)
 void asmlinkage noreturn start_secondary(void)
 {
     unsigned int cpuid = init_data.cpuid;
+    int rc;
 
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
@@ -366,6 +367,14 @@ void asmlinkage noreturn start_secondary(void)
         stop_cpu();
     }
 
+    rc = gic_init_secondary_cpu();
+    if ( rc )
+    {
+        printk(XENLOG_ERR "CPU%u: Failed to initialize the GIC: %d\n",
+               smp_processor_id(), rc);
+        stop_cpu();
+    }
+
     /*
      * system features must be updated only if we do not stop the core or
      * we might disable features due to a non used core (for example when
@@ -373,8 +382,6 @@ void asmlinkage noreturn start_secondary(void)
      */
     update_system_features(&current_cpu_data);
 
-    gic_init_secondary_cpu();
-
     set_current(idle_vcpu[cpuid]);
 
     /* Run local notifiers */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:55:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:55:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428725.1651622 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5y-00052t-1o; Tue, 22 Sep 2026 11:55:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428725.1651622; Tue, 22 Sep 2026 11:55:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z5x-00052l-VU; Tue, 22 Sep 2026 11:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1428725;
 Tue, 22 Sep 2026 11:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z5w-00052c-Lr
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5w-00Aw63-12
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z5w-0047x6-1y
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=eLp35/lYQVjBRP/X+FwAJfAMR2u0DC7VKQuGwgMyUWY=; b=jSd/czOf9zqFkQ37ho/NC7LFkf
	3qc5x9lkODrcBVz1lC5gP4wGp6fvnUyLIx/lkHWhLOdFi4qyeJJE1oBNIbwYJ6ZadhdvAun74PcI4
	vZS1DhnX0/KiL4NIlGDxmapf66EoU93Kq9w/z2AaUzvwAJDBEQe3HGIc+TUYA0tuitYc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
Message-Id: <E1x8z5w-0047x6-1y@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:55:32 +0000

commit 4861c790b9c5cfe305f519fb68d0079205fed03a
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 11 15:08:18 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
    
    The comments on the PMINTENSET/PMINTENCLR cases claim that an EL0 access
    may be trapped to EL2 when MDCR_EL2.TPM is set, and that such a case is
    handled. Both are inaccurate. PMINTENSET_EL1/PMINTENCLR_EL1 are accessible
    at EL1 and above only, with no enable making them accessible at EL0.
    
    Arm ARM (DDI 0487M.b) D1.4.5.6 "Prioritization of Synchronous
    exceptions" orders the two exceptions. An access that is never
    accessible at the current Exception level regardless of any enables or
    traps is priority 18, whereas an exception taken to EL2 as the result of
    a configuration control in MDCR_EL2 is priority 24. An EL0 access is
    therefore UNDEFINED and taken to EL1.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    (cherry picked from commit 87a8a5728e5936f088c94bd7960c70f9b1cef36e)
---
 xen/arch/arm/arm64/vsysreg.c | 4 ----
 xen/arch/arm/vcpreg.c        | 1 -
 2 files changed, 5 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index d14258290f..3cc607ebac 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,10 +229,6 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
-        /*
-         * Accessible from EL1 only, but if EL0 trap happens handle as
-         * undef.
-         */
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index e7c484f2c1..2764c072cb 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -294,7 +294,6 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
-        /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:55:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:55:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428726.1651625 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z68-00055L-3L; Tue, 22 Sep 2026 11:55:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428726.1651625; Tue, 22 Sep 2026 11:55:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z68-00055D-0Y; Tue, 22 Sep 2026 11:55:44 +0000
Received: by outflank-mailman (input) for mailman id 1428726;
 Tue, 22 Sep 2026 11:55:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z66-000552-Oz
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:55:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z66-00Aw6v-1M
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z66-0048wW-2I
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/yzYrjB7brP+z8QTxFN8iBbLx7dAtww4YTCkdAJwZ2c=; b=084E0E/ePlC0psIuStw44MAezb
	qvlgqSiMHx6wIpPdKw5S9oLPIgL/Gn1i3nYIymepiL7cjLkG6Gt6h/FRG9bkoGcChFa9kuwvWbY1s
	rkYPV9ZW7T/rOdTOm0vVMYwPiPn0Zz9l0wIpTz5F5jsZh7XGyvMe3vu9ll5TyB6j0fVQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
Message-Id: <E1x8z66-0048wW-2I@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:55:42 +0000

commit d057acfd4352315ee26750bad25bc349bb7d6157
Author:     Hirokazu Takahashi <taka@valinux.co.jp>
AuthorDate: Wed Aug 26 12:55:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
    
    On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled
    causes the domain to probe advanced PMU feature based on system ID
    register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1,
    which causes unhandled register traps and crashes the domain.
    
    To address this issue, implement the following:
    
    - Add emulation for ID_AA64DFR{0,1}_EL1, ID_DFR{0,1}_EL1 and
      ID_DFR{0,1} register accesses for guest domains.
    - Hide PMU registers from a guest domain when its vPMU feature is
      disabled.
    - Proactively make SPE, TRBE, BRBE, Trace Extensions, SPMU, ITE and
      EBEP inaccessible to arm64 guest domains and hide TraceFilt,
      MMapTrc and CopTrc to arm32 guest domains, as they could
      potentially cause similar issues.
    
    Fixes: dbb948110a0e ("xen: Expose the PMU to the guests")
    Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
    Fixes: 3669a1cb9598 ("xen/arm: create a cpuinfo structure for guest")
    Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit b836ef686efe4d01fb54a12cb1e9df7ec0494201)
---
 xen/arch/arm/arm64/vsysreg.c          | 59 ++++++++++++++++++++++++++++++++---
 xen/arch/arm/cpufeature.c             | 18 +++++++++++
 xen/arch/arm/domain.c                 |  2 +-
 xen/arch/arm/include/asm/arm64/hsr.h  |  1 +
 xen/arch/arm/include/asm/cpregs.h     |  1 +
 xen/arch/arm/include/asm/cpufeature.h | 27 +++++++++++-----
 xen/arch/arm/vcpreg.c                 | 34 ++++++++++++++++----
 xen/include/xen/sched.h               |  5 +++
 8 files changed, 129 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index 3cc607ebac..d7d4f14ff7 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,6 +229,7 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
+    case HSR_SYSREG_PMMIR_EL1:
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
@@ -302,8 +303,32 @@ void do_sysreg(struct cpu_user_regs *regs,
     GENERATE_TID3_INFO(ID_PFR0_EL1, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1_EL1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2_EL1, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0_EL1, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1_EL1, dbg32, 1)
+
+    case HSR_SYSREG_ID_DFR0_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_DFR1_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0_EL1, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0_EL1, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1_EL1, mm32, 1)
@@ -344,8 +369,34 @@ void do_sysreg(struct cpu_user_regs *regs,
     }
 
     GENERATE_TID3_INFO(ID_AA64PFR1_EL1, pfr64, 1)
-    GENERATE_TID3_INFO(ID_AA64DFR0_EL1, dbg64, 0)
-    GENERATE_TID3_INFO(ID_AA64DFR1_EL1, dbg64, 1)
+
+    case HSR_SYSREG_ID_AA64DFR0_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg64.pmu_ver = 0;
+            info_dbg64.pmss = 0;
+            info_dbg64.mtpmu = 0;
+            info_dbg64.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_AA64DFR1_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg64.pmicntr = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AA64ISAR0_EL1, isa64, 0)
     GENERATE_TID3_INFO(ID_AA64ISAR1_EL1, isa64, 1)
     GENERATE_TID3_INFO(ID_AA64MMFR0_EL1, mm64, 0)
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 94d14fb6a9..8d8cd19a96 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -219,8 +219,26 @@ static int __init create_domain_cpuinfo(void)
     domain_cpuinfo.isa64.api = 0;
     domain_cpuinfo.isa64.gpa = 0;
     domain_cpuinfo.isa64.gpi = 0;
+
+    /* Hide SPE, DPFZS, TRBE, BRBE, Trace Extensions, SPMU, ITE and EBEP */
+    domain_cpuinfo.dbg64.trace_ver = 0;
+    domain_cpuinfo.dbg64.pms_ver = 0;
+    domain_cpuinfo.dbg64.dpfzs = 0;
+    domain_cpuinfo.dbg64.trace_filt = 0;
+    domain_cpuinfo.dbg64.trace_buffer = 0;
+    domain_cpuinfo.dbg64.ext_trc_buff = 0;
+    domain_cpuinfo.dbg64.brbe = 0;
+    domain_cpuinfo.dbg64.syspmuid = 0;
+    domain_cpuinfo.dbg64.spmu = 0;
+    domain_cpuinfo.dbg64.ite = 0;
+    domain_cpuinfo.dbg64.ebep = 0;
 #endif
 
+    /* Hide Trace Extensions for AArch32 domain */
+    domain_cpuinfo.dbg32.coptrc = 0;
+    domain_cpuinfo.dbg32.mmaptrc = 0;
+    domain_cpuinfo.dbg32.tracefilt = 0;
+
     /* Hide AMU support */
 #ifdef CONFIG_ARM_64
     domain_cpuinfo.pfr64.amu = 0;
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 38d7768de9..81720ed467 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -559,7 +559,7 @@ int arch_vcpu_create(struct vcpu *v)
     v->arch.hcr_el2 = get_default_hcr_flags();
 
     v->arch.mdcr_el2 = HDCR_TDRA | HDCR_TDOSA | HDCR_TDA;
-    if ( !(v->domain->options & XEN_DOMCTL_CDF_vpmu) )
+    if ( !is_vpmu_domain(v->domain) )
         v->arch.mdcr_el2 |= HDCR_TPM | HDCR_TPMCR;
 
     if ( (rc = vcpu_vgic_init(v)) != 0 )
diff --git a/xen/arch/arm/include/asm/arm64/hsr.h b/xen/arch/arm/include/asm/arm64/hsr.h
index 1495ccddea..ed18184cc7 100644
--- a/xen/arch/arm/include/asm/arm64/hsr.h
+++ b/xen/arch/arm/include/asm/arm64/hsr.h
@@ -84,6 +84,7 @@
 #define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
 #define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1)
 #define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2)
+#define HSR_SYSREG_PMMIR_EL1      HSR_SYSREG(3,0,c9,c14,6)
 #define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
 #define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
 #define HSR_SYSREG_ICC_SGI1R_EL1  HSR_SYSREG(3,0,c12,c11,5)
diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h
index a7503a190f..3f62b38dc0 100644
--- a/xen/arch/arm/include/asm/cpregs.h
+++ b/xen/arch/arm/include/asm/cpregs.h
@@ -246,6 +246,7 @@
 #define PMINTENSET      p15,0,c9,c14,1  /* Perf. Mon. Interrupt Enable Set Register */
 #define PMINTENCLR      p15,0,c9,c14,2  /* Perf. Mon. Interrupt Enable Clear Register */
 #define PMOVSSET        p15,0,c9,c14,3  /* Perf. Mon. Overflow Flag Status Set register */
+#define PMMIR           p15,0,c9,c14,6  /* Perf. Mon. Machine Identification Register */
 
 /* CP15 CR10: */
 #define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index b6df188011..63f6cb4412 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -208,7 +208,7 @@ struct cpuinfo_arm {
         };
     } pfr64;
 
-    union {
+    union cpuinfo_dbg64 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -216,19 +216,31 @@ struct cpuinfo_arm {
             unsigned long trace_ver:4;
             unsigned long pmu_ver:4;
             unsigned long brps:4;
-            unsigned long __res0:4;
+            unsigned long pmss:4;
             unsigned long wrps:4;
             unsigned long __res1:4;
             unsigned long ctx_cmps:4;
             unsigned long pms_ver:4;
             unsigned long double_lock:4;
             unsigned long trace_filt:4;
-            unsigned long __res2:4;
+            unsigned long trace_buffer:4;
             unsigned long mtpmu:4;
-            unsigned long __res3:12;
+            unsigned long brbe:4;
+            unsigned long ext_trc_buff:4;
+            unsigned long hpmn0:4;
 
             /* DFR1 */
-            unsigned long __res4:64;
+            unsigned long syspmuid:8;
+            unsigned long brps1:8;
+            unsigned long wrps1:8;
+            unsigned long ctx_cmps1:8;
+            unsigned long spmu:4;
+            unsigned long pmicntr:4;
+            unsigned long able:4;
+            unsigned long ite:4;
+            unsigned long ebep:4;
+            unsigned long dpfzs:4;
+            unsigned long abl_cmps:8;
         };
     } dbg64;
 
@@ -401,7 +413,7 @@ struct cpuinfo_arm {
         };
     } pfr32;
 
-    union {
+    union cpuinfo_dbg32 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -419,7 +431,8 @@ struct cpuinfo_arm {
 
             /* DFR1 */
             unsigned long mtpmu:4;
-            unsigned long __res1:28;
+            unsigned long hpmn0:4;
+            unsigned long __res1:24;
 #ifdef CONFIG_ARM_64
             unsigned long __res2:32;
 #endif
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 2764c072cb..99ac8db233 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -278,10 +278,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
      *
      * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR.
      */
-    /* We could trap ID_DFR0 and tell the guest we don't support
-     * performance monitoring, but Linux doesn't check the ID_DFR0.
-     * Therefore it will read PMCR.
-     *
+    /*
      * We tell the guest we have 0 counters. Unfortunately we must
      * always support PMCCNTR (the cyle counter): we just RAZ/WI for all
      * PM register, which doesn't crash the kernel at least
@@ -294,6 +291,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
+    case HSR_CPREG32(PMMIR):
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
@@ -322,8 +320,32 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
     GENERATE_TID3_INFO(ID_PFR0, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1, dbg32, 1)
+
+    case HSR_CPREG32(ID_DFR0):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_CPREG32(ID_DFR1):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1, mm32, 1)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index f42fcaf20e..5d97f89a6d 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -1240,6 +1240,11 @@ static always_inline bool is_iommu_enabled(const struct domain *d)
     return evaluate_nospec(d->options & XEN_DOMCTL_CDF_iommu);
 }
 
+static inline bool is_vpmu_domain(const struct domain *d)
+{
+    return d->options & XEN_DOMCTL_CDF_vpmu;
+}
+
 #ifdef CONFIG_MEM_PAGING
 # define mem_paging_enabled(d) vm_event_check_ring((d)->vm_event_paging)
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:55:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:55:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428727.1651630 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z6I-00058R-6V; Tue, 22 Sep 2026 11:55:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428727.1651630; Tue, 22 Sep 2026 11:55:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z6I-00058I-3f; Tue, 22 Sep 2026 11:55:54 +0000
Received: by outflank-mailman (input) for mailman id 1428727;
 Tue, 22 Sep 2026 11:55:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z6G-00057t-S9
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:55:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z6G-00Aw7t-1e
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z6G-0049yG-2b
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:55:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=NauTF3Kjj0guAVrENsJX6voroqtXnThRimK92fnJl3E=; b=WAwDhSrlw9F4UHPXYy9+UuJtFL
	uX2GJdT0xtJrswqKpG4YUodBv8RLMoqbf8T/UVya7bT9K/PYKyv4t0Bmd0Z88jEDokHm5rvlpabkM
	2Wt+7AcBC7ZipRrkJ7YTGrLuQRgKuCuLcu2BsYt/Q1ylzLSvQz7O0YoA7yWy5LI3Qr/w=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/arm: traps: report level 0 faults in panic_PAR()
Message-Id: <E1x8z6G-0049yG-2b@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:55:52 +0000

commit 2f5ea398f7d308ee43fae31382844ac5098b5858
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 25 08:23:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: traps: report level 0 faults in panic_PAR()
    
    decode_fsc() derives the fault level from the low two bits of the FSC, so
    level 0 is a valid output: FSC_FLT_TRANS is 0x04, i.e. "translation fault,
    level 0 or translation table base register".
    
    This is reachable on arm64 because xen_pgtable is the zeroeth-level root,
    but fsc_level_str() has no case for it and prints " (level invalid)"
    instead. At the time the function was created Xen used only three levels.
    
    Add the missing case. On arm32 the zeroeth level does not exist but FSC
    0 denotes address size fault at translation table base register.
    
    While at it, make decode_fsc() decode also address size faults.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    (cherry picked from commit 4e1f58ea1a20d8a831ad72aa30eafa618dfae750)
---
 xen/arch/arm/include/asm/processor.h | 2 ++
 xen/arch/arm/traps.c                 | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
index 25c5762c67..59b971c84a 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -513,6 +513,7 @@ extern register_t __cpu_logical_map[];
 /*
  * 543210 BIT
  * 00XXLL -- XX Fault Level LL
+ * ..00LL -- Address Size Fault LL
  * ..01LL -- Translation Fault LL
  * ..10LL -- Access Fault LL
  * ..11LL -- Permission Fault LL
@@ -526,6 +527,7 @@ extern register_t __cpu_logical_map[];
 #define FSC_TYPE_OTH   (_AC(0x02,U)<<4)
 #define FSC_TYPE_IMPL  (_AC(0x03,U)<<4)
 
+#define FSC_FLT_ADDR_SIZE (0x00)
 #define FSC_FLT_TRANS  (0x04)
 #define FSC_FLT_ACCESS (0x08)
 #define FSC_FLT_PERM   (0x0c)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 040c0f2e0d..fa02070a86 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -307,6 +307,10 @@ static const char *decode_fsc(uint32_t fsc, int *level)
 
     switch ( fsc & 0x3f )
     {
+    case FSC_FLT_ADDR_SIZE ... FSC_FLT_ADDR_SIZE + 3:
+        msg = "Address size fault";
+        *level = fsc & FSC_LL_MASK;
+        break;
     case FSC_FLT_TRANS ... FSC_FLT_TRANS + 3:
         msg = "Translation fault";
         *level = fsc & FSC_LL_MASK;
@@ -363,6 +367,7 @@ static const char *fsc_level_str(int level)
     switch ( level )
     {
     case -1: return "";
+    case 0:  return " at level 0 or TTBR";
     case 1:  return " at level 1";
     case 2:  return " at level 2";
     case 3:  return " at level 3";
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 11:56:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 11:56:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428728.1651635 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z6S-0005Ap-7m; Tue, 22 Sep 2026 11:56:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428728.1651635; Tue, 22 Sep 2026 11:56:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8z6S-0005Ah-4x; Tue, 22 Sep 2026 11:56:04 +0000
Received: by outflank-mailman (input) for mailman id 1428728;
 Tue, 22 Sep 2026 11:56:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8z6Q-0005AV-US
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 11:56:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z6Q-00Aw9C-1u
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:56:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8z6Q-004AnQ-2r
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 11:56:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=JXWi8ySuszbb16rfP5hYOBQTz9dISsb/yd5WbZlrXpU=; b=Ar7H6TqppxdW/zUW/oFhhmOW+F
	Pibe0XeydExmOLRkqHghVtqPSyIeNjVWsl3WZp1rWuT/cJGPbMhnBe/KVO0+O257LNklDLB5h12Sx
	+bf3ufBrhBky3Kd+6uOKpLXwuPbb9awGFGpDOpyF6erC6wCdN/HA7z5dby098QyOx220=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.21] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x8z6Q-004AnQ-2r@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 11:56:02 +0000

commit 314bdc9be433c39a01af8b25b68ab748aac5e873
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:58:49 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681)
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.21


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:11:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:11:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428735.1651638 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zKx-0008MY-ES; Tue, 22 Sep 2026 12:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428735.1651638; Tue, 22 Sep 2026 12:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zKx-0008MQ-Bq; Tue, 22 Sep 2026 12:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1428735;
 Tue, 22 Sep 2026 12:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zKw-0008MF-7s
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zKv-00AxaS-21
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zKv-005XkU-2w
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=EEclycizIUMJFELRJhC4SqIye9SQqkghCkHCfAcwUXY=; b=DdHc3SWMhcCR/0mDq04m1RddjJ
	6gUYrQrxoxqf/v7ACS/XxfcAgQoTKFHp7tD5yGk7AtaRF1f8ebEycQnjIoXwGBW2RvRG6smTd9ppz
	anCPfVEU42QXp+QghtnIg10bi5FCylPNRt/9hiaaa4iqLahroTMrQa6EdisFx205F4SM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: mask debug exceptions in initial AArch64 guest state
Message-Id: <E1x8zKv-005XkU-2w@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:11:01 +0000

commit 5c84622f4f32e4e01be792f5b8f63459c843b891
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Fri Jun 19 20:37:38 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:54:02 2026 +0200

    xen/arm: mask debug exceptions in initial AArch64 guest state
    
    PSR_GUEST64_INIT currently masks SError, IRQ and FIQ, but leaves debug
    exceptions unmasked. Both the AArch64 Linux boot protocol and PSCI entry
    requirements expect PSTATE.DAIF to be masked.
    
    Add PSR_DBG_MASK to PSR_GUEST64_INIT. This fixes the initial AArch64 guest
    entry state as well as virtual PSCI CPU_ON and SYSTEM_SUSPEND resume entry.
    
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    (cherry picked from commit ad8663a75aa8db4255d6690bfc210d559edc9f5b)
---
 xen/include/public/arch-arm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 7d6f87e8b2..00de30b896 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -420,7 +420,8 @@ typedef uint64_t xen_callback_t;
  * zImage kernels on aarch32.
  */
 #define PSR_GUEST32_INIT (PSR_Z|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+#define PSR_GUEST64_INIT \
+    (PSR_DBG_MASK|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
 
 #define SCTLR_GUEST_INIT    xen_mk_ullong(0x00c50078)
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:11:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:11:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428737.1651642 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zL7-0008Ow-Fq; Tue, 22 Sep 2026 12:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428737.1651642; Tue, 22 Sep 2026 12:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zL7-0008Oo-DA; Tue, 22 Sep 2026 12:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1428737;
 Tue, 22 Sep 2026 12:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zL6-0008Ob-2G
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zL5-00AxbO-2J
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zL6-005YrO-01
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=u4Hjy8Oau3wGxZjtrtSLFMatcOibAYQufyB48KA0iDw=; b=nQVpZ0uVBZFbuSwnOY9b2tiunG
	ey1Py6xMnjaIuxT4lRs6+yo34YS2TwijWQ0Iw6ID8qPbRkhCZGvWltEKs3mwnDZbzAD91trA42EGS
	eD5+dfR3OyJdjeupFtzgiShmEyqr4echcKw815rEXpHVXnVBAPHOpkM+59KOSAKcH1zM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
Message-Id: <E1x8zL6-005YrO-01@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:11:12 +0000

commit a6382ae784ea2f8bd1c846ba0b63913d23002e45
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Aug 5 14:11:24 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:55:37 2026 +0200

    xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
    
    process_domain_node() parses "xen,static-mem" regardless of
    CONFIG_STATIC_MEMORY. With the feature off, init_staticmem_pages() is a
    no-op stub, so boot carries on until construct_domU() reaches the
    ASSERT_UNREACHABLE() stubs of allocate_static_memory() /
    assign_static_memory_11(): a debug build trips the assertion, a production
    build gives the domain no memory at all.
    
    Bail out at parse time instead, like process_shm_node() already does for
    CONFIG_STATIC_SHM.
    
    Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
    (cherry picked from commit e888192d133eeec8a94275eaf4194117f198a7e2)
---
 xen/common/device-tree/bootinfo-fdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/common/device-tree/bootinfo-fdt.c b/xen/common/device-tree/bootinfo-fdt.c
index 272b5a6c0a..ca64daf4cd 100644
--- a/xen/common/device-tree/bootinfo-fdt.c
+++ b/xen/common/device-tree/bootinfo-fdt.c
@@ -349,6 +349,12 @@ static int __init process_domain_node(const void *fdt, int node,
         /* No "xen,static-mem" present. */
         return 0;
 
+    if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
+    {
+        printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n");
+        return -EINVAL;
+    }
+
     return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells,
                                    size_cells, bootinfo_get_reserved_mem(),
                                    MEMBANK_STATIC_DOMAIN);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:11:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:11:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428738.1651646 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLH-0008RS-H4; Tue, 22 Sep 2026 12:11:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428738.1651646; Tue, 22 Sep 2026 12:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLH-0008RK-EU; Tue, 22 Sep 2026 12:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1428738;
 Tue, 22 Sep 2026 12:11:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zLG-0008R5-5B
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:11:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLF-00AxcF-2b
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLG-005ZoG-0J
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=rGUr44mTEL1MceHBhRmO4xtIfn2/JIK4NDrImnJiGek=; b=bowY/M06apSXESP+In8LsV2OEX
	bIeC+zKmCGRQMZj9Q5+OamxD1xbNmXk529hgHvaoZUJh/2kotXBuA9N3PHxyPt3HdzkSciZxlBHxB
	vdy9I1DW8flXwqzF/PNESvfE9AU1zu5vMK9CrEJysPdbgQnAhEHmESIYg9QfR4SIYQfQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: propagate secondary GIC initialization failures
Message-Id: <E1x8zLG-005ZoG-0J@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:11:22 +0000

commit 39b09ab61fbe759af2d6fc43f3d48dd8d11e7832
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Mon Aug 10 22:41:46 2026 +0300
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:56:01 2026 +0200

    xen/arm: propagate secondary GIC initialization failures
    
    The GICv3 secondary_init() callback can fail while discovering or
    waking a Redistributor, enabling LPIs, or setting up an ITS collection.
    gic_init_secondary_cpu() currently discards that status. start_secondary()
    then marks the CPU online even though its per-CPU GIC interface may be
    unusable.
    
    Return the callback status through the common GIC layer. Have
    start_secondary() report the failure and stop the affected CPU before it
    updates system features or is added to cpu_online_map.
    
    Fixes: bc183a0235e0 ("xen/arm: Add support for GIC v3")
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit 0102b592f46ff3f0784e693efa0b812551345271)
---
 xen/arch/arm/gic.c             | 10 ++++++++--
 xen/arch/arm/include/asm/gic.h |  2 +-
 xen/arch/arm/smpboot.c         | 11 +++++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index ee75258fc3..078049e741 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -282,11 +282,17 @@ void smp_send_state_dump(unsigned int cpu)
 }
 
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
-void gic_init_secondary_cpu(void)
+int gic_init_secondary_cpu(void)
 {
-    gic_hw_ops->secondary_init();
+    int rc = gic_hw_ops->secondary_init();
+
+    if ( rc )
+        return rc;
+
     /* Clear LR mask for secondary cpus */
     clear_cpu_lr_mask();
+
+    return 0;
 }
 
 /* Shut down the per-CPU GIC interface */
diff --git a/xen/arch/arm/include/asm/gic.h b/xen/arch/arm/include/asm/gic.h
index ff22dea40d..ee2c26adb4 100644
--- a/xen/arch/arm/include/asm/gic.h
+++ b/xen/arch/arm/include/asm/gic.h
@@ -291,7 +291,7 @@ extern void gic_preinit(void);
 /* Bring up the interrupt controller, and report # cpus attached */
 extern void gic_init(void);
 /* Bring up a secondary CPU's per-CPU GIC interface */
-extern void gic_init_secondary_cpu(void);
+extern int gic_init_secondary_cpu(void);
 /* Take down a CPU's per-CPU GIC interface */
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 7f3cfa812e..b7966b3f90 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -318,6 +318,7 @@ smp_prepare_cpus(void)
 void asmlinkage noreturn start_secondary(void)
 {
     unsigned int cpuid = init_data.cpuid;
+    int rc;
 
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
@@ -365,6 +366,14 @@ void asmlinkage noreturn start_secondary(void)
         stop_cpu();
     }
 
+    rc = gic_init_secondary_cpu();
+    if ( rc )
+    {
+        printk(XENLOG_ERR "CPU%u: Failed to initialize the GIC: %d\n",
+               smp_processor_id(), rc);
+        stop_cpu();
+    }
+
     /*
      * system features must be updated only if we do not stop the core or
      * we might disable features due to a non used core (for example when
@@ -372,8 +381,6 @@ void asmlinkage noreturn start_secondary(void)
      */
     update_system_features(&current_cpu_data);
 
-    gic_init_secondary_cpu();
-
     set_current(idle_vcpu[cpuid]);
 
     /* Run local notifiers */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:11:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:11:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428739.1651650 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLR-0008Tr-Id; Tue, 22 Sep 2026 12:11:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428739.1651650; Tue, 22 Sep 2026 12:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLR-0008Ti-Fr; Tue, 22 Sep 2026 12:11:33 +0000
Received: by outflank-mailman (input) for mailman id 1428739;
 Tue, 22 Sep 2026 12:11:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zLQ-0008TW-80
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:11:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLP-00Axd9-2t
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLQ-005apB-0a
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=LyLXOLmsy1CAGQndkdAJ4zJS7NttFy9x+av1LHebZzA=; b=zn0rvYXQB2dRQtX9qrFd/6rboQ
	Dc/wRkKYGJSzAlw6vlx8ziKtf75SBXQv4xoCwCdeAFh9UfrZzzsIkkYoHNcDnS4NCEQkvfuvQTa57
	TBH3m4FVx0YMHhkQPYZdhj6iy1P4sIMQMfX3mG2rEm0Sv0ntTihVGGr5VChZVScMUAWs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
Message-Id: <E1x8zLQ-005apB-0a@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:11:32 +0000

commit 6a3824e4d6f9f58536ca60249c18f18b4ac1f95b
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 11 15:08:18 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:56:50 2026 +0200

    xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
    
    The comments on the PMINTENSET/PMINTENCLR cases claim that an EL0 access
    may be trapped to EL2 when MDCR_EL2.TPM is set, and that such a case is
    handled. Both are inaccurate. PMINTENSET_EL1/PMINTENCLR_EL1 are accessible
    at EL1 and above only, with no enable making them accessible at EL0.
    
    Arm ARM (DDI 0487M.b) D1.4.5.6 "Prioritization of Synchronous
    exceptions" orders the two exceptions. An access that is never
    accessible at the current Exception level regardless of any enables or
    traps is priority 18, whereas an exception taken to EL2 as the result of
    a configuration control in MDCR_EL2 is priority 24. An EL0 access is
    therefore UNDEFINED and taken to EL1.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    (cherry picked from commit 87a8a5728e5936f088c94bd7960c70f9b1cef36e)
---
 xen/arch/arm/arm64/vsysreg.c | 4 ----
 xen/arch/arm/vcpreg.c        | 1 -
 2 files changed, 5 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index d14258290f..3cc607ebac 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,10 +229,6 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
-        /*
-         * Accessible from EL1 only, but if EL0 trap happens handle as
-         * undef.
-         */
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index e7c484f2c1..2764c072cb 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -294,7 +294,6 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
-        /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:11:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:11:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428740.1651654 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLb-0008WO-KK; Tue, 22 Sep 2026 12:11:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428740.1651654; Tue, 22 Sep 2026 12:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLb-0008WG-HG; Tue, 22 Sep 2026 12:11:43 +0000
Received: by outflank-mailman (input) for mailman id 1428740;
 Tue, 22 Sep 2026 12:11:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zLa-0008W4-Bc
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:11:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLa-00Axe4-01
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLa-005boO-0w
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=gd9AlLSARiTIjfzRjjyeI5TqUAVj4PI/+vHC8nMg32s=; b=bsKG+PytlazuDAk6wh93mBNDgu
	plxyM3Y4C1ujIDH4Mb3JT/h5TKvAs+byQDiWZDxhwNMa+7rBkSbPK25vFvRaXz0rLjyb/TUAWEYXt
	4HuGRh/kmJ3NJ8bpmmlhKFlc6syPvg+woEWWk/6tBRoUlQVgyL4b/9Y2cY9yYpJRtf3U=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
Message-Id: <E1x8zLa-005boO-0w@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:11:42 +0000

commit 84cc114ffded609ba221082311ded45e3a5e8087
Author:     Hirokazu Takahashi <taka@valinux.co.jp>
AuthorDate: Wed Aug 26 12:55:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:56:50 2026 +0200

    xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
    
    On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled
    causes the domain to probe advanced PMU feature based on system ID
    register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1,
    which causes unhandled register traps and crashes the domain.
    
    To address this issue, implement the following:
    
    - Add emulation for ID_AA64DFR{0,1}_EL1, ID_DFR{0,1}_EL1 and
      ID_DFR{0,1} register accesses for guest domains.
    - Hide PMU registers from a guest domain when its vPMU feature is
      disabled.
    - Proactively make SPE, TRBE, BRBE, Trace Extensions, SPMU, ITE and
      EBEP inaccessible to arm64 guest domains and hide TraceFilt,
      MMapTrc and CopTrc to arm32 guest domains, as they could
      potentially cause similar issues.
    
    Fixes: dbb948110a0e ("xen: Expose the PMU to the guests")
    Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
    Fixes: 3669a1cb9598 ("xen/arm: create a cpuinfo structure for guest")
    Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit b836ef686efe4d01fb54a12cb1e9df7ec0494201)
---
 xen/arch/arm/arm64/vsysreg.c          | 59 ++++++++++++++++++++++++++++++++---
 xen/arch/arm/cpufeature.c             | 18 +++++++++++
 xen/arch/arm/domain.c                 |  2 +-
 xen/arch/arm/include/asm/arm64/hsr.h  |  1 +
 xen/arch/arm/include/asm/cpregs.h     |  1 +
 xen/arch/arm/include/asm/cpufeature.h | 27 +++++++++++-----
 xen/arch/arm/vcpreg.c                 | 34 ++++++++++++++++----
 xen/include/xen/sched.h               |  5 +++
 8 files changed, 129 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index 3cc607ebac..d7d4f14ff7 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,6 +229,7 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
+    case HSR_SYSREG_PMMIR_EL1:
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
@@ -302,8 +303,32 @@ void do_sysreg(struct cpu_user_regs *regs,
     GENERATE_TID3_INFO(ID_PFR0_EL1, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1_EL1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2_EL1, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0_EL1, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1_EL1, dbg32, 1)
+
+    case HSR_SYSREG_ID_DFR0_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_DFR1_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0_EL1, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0_EL1, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1_EL1, mm32, 1)
@@ -344,8 +369,34 @@ void do_sysreg(struct cpu_user_regs *regs,
     }
 
     GENERATE_TID3_INFO(ID_AA64PFR1_EL1, pfr64, 1)
-    GENERATE_TID3_INFO(ID_AA64DFR0_EL1, dbg64, 0)
-    GENERATE_TID3_INFO(ID_AA64DFR1_EL1, dbg64, 1)
+
+    case HSR_SYSREG_ID_AA64DFR0_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg64.pmu_ver = 0;
+            info_dbg64.pmss = 0;
+            info_dbg64.mtpmu = 0;
+            info_dbg64.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_AA64DFR1_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg64.pmicntr = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AA64ISAR0_EL1, isa64, 0)
     GENERATE_TID3_INFO(ID_AA64ISAR1_EL1, isa64, 1)
     GENERATE_TID3_INFO(ID_AA64MMFR0_EL1, mm64, 0)
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 94d14fb6a9..8d8cd19a96 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -219,8 +219,26 @@ static int __init create_domain_cpuinfo(void)
     domain_cpuinfo.isa64.api = 0;
     domain_cpuinfo.isa64.gpa = 0;
     domain_cpuinfo.isa64.gpi = 0;
+
+    /* Hide SPE, DPFZS, TRBE, BRBE, Trace Extensions, SPMU, ITE and EBEP */
+    domain_cpuinfo.dbg64.trace_ver = 0;
+    domain_cpuinfo.dbg64.pms_ver = 0;
+    domain_cpuinfo.dbg64.dpfzs = 0;
+    domain_cpuinfo.dbg64.trace_filt = 0;
+    domain_cpuinfo.dbg64.trace_buffer = 0;
+    domain_cpuinfo.dbg64.ext_trc_buff = 0;
+    domain_cpuinfo.dbg64.brbe = 0;
+    domain_cpuinfo.dbg64.syspmuid = 0;
+    domain_cpuinfo.dbg64.spmu = 0;
+    domain_cpuinfo.dbg64.ite = 0;
+    domain_cpuinfo.dbg64.ebep = 0;
 #endif
 
+    /* Hide Trace Extensions for AArch32 domain */
+    domain_cpuinfo.dbg32.coptrc = 0;
+    domain_cpuinfo.dbg32.mmaptrc = 0;
+    domain_cpuinfo.dbg32.tracefilt = 0;
+
     /* Hide AMU support */
 #ifdef CONFIG_ARM_64
     domain_cpuinfo.pfr64.amu = 0;
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index baa3a5d708..a739dd157e 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -501,7 +501,7 @@ int arch_vcpu_create(struct vcpu *v)
     v->arch.hcr_el2 = get_default_hcr_flags();
 
     v->arch.mdcr_el2 = HDCR_TDRA | HDCR_TDOSA | HDCR_TDA;
-    if ( !(v->domain->options & XEN_DOMCTL_CDF_vpmu) )
+    if ( !is_vpmu_domain(v->domain) )
         v->arch.mdcr_el2 |= HDCR_TPM | HDCR_TPMCR;
 
     if ( (rc = vcpu_vgic_init(v)) != 0 )
diff --git a/xen/arch/arm/include/asm/arm64/hsr.h b/xen/arch/arm/include/asm/arm64/hsr.h
index 1495ccddea..ed18184cc7 100644
--- a/xen/arch/arm/include/asm/arm64/hsr.h
+++ b/xen/arch/arm/include/asm/arm64/hsr.h
@@ -84,6 +84,7 @@
 #define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
 #define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1)
 #define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2)
+#define HSR_SYSREG_PMMIR_EL1      HSR_SYSREG(3,0,c9,c14,6)
 #define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
 #define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
 #define HSR_SYSREG_ICC_SGI1R_EL1  HSR_SYSREG(3,0,c12,c11,5)
diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h
index a7503a190f..3f62b38dc0 100644
--- a/xen/arch/arm/include/asm/cpregs.h
+++ b/xen/arch/arm/include/asm/cpregs.h
@@ -246,6 +246,7 @@
 #define PMINTENSET      p15,0,c9,c14,1  /* Perf. Mon. Interrupt Enable Set Register */
 #define PMINTENCLR      p15,0,c9,c14,2  /* Perf. Mon. Interrupt Enable Clear Register */
 #define PMOVSSET        p15,0,c9,c14,3  /* Perf. Mon. Overflow Flag Status Set register */
+#define PMMIR           p15,0,c9,c14,6  /* Perf. Mon. Machine Identification Register */
 
 /* CP15 CR10: */
 #define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index bf902a3970..c554686415 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -208,7 +208,7 @@ struct cpuinfo_arm {
         };
     } pfr64;
 
-    union {
+    union cpuinfo_dbg64 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -216,19 +216,31 @@ struct cpuinfo_arm {
             unsigned long trace_ver:4;
             unsigned long pmu_ver:4;
             unsigned long brps:4;
-            unsigned long __res0:4;
+            unsigned long pmss:4;
             unsigned long wrps:4;
             unsigned long __res1:4;
             unsigned long ctx_cmps:4;
             unsigned long pms_ver:4;
             unsigned long double_lock:4;
             unsigned long trace_filt:4;
-            unsigned long __res2:4;
+            unsigned long trace_buffer:4;
             unsigned long mtpmu:4;
-            unsigned long __res3:12;
+            unsigned long brbe:4;
+            unsigned long ext_trc_buff:4;
+            unsigned long hpmn0:4;
 
             /* DFR1 */
-            unsigned long __res4:64;
+            unsigned long syspmuid:8;
+            unsigned long brps1:8;
+            unsigned long wrps1:8;
+            unsigned long ctx_cmps1:8;
+            unsigned long spmu:4;
+            unsigned long pmicntr:4;
+            unsigned long able:4;
+            unsigned long ite:4;
+            unsigned long ebep:4;
+            unsigned long dpfzs:4;
+            unsigned long abl_cmps:8;
         };
     } dbg64;
 
@@ -408,7 +420,7 @@ struct cpuinfo_arm {
         };
     } pfr32;
 
-    union {
+    union cpuinfo_dbg32 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -426,7 +438,8 @@ struct cpuinfo_arm {
 
             /* DFR1 */
             unsigned long mtpmu:4;
-            unsigned long __res1:28;
+            unsigned long hpmn0:4;
+            unsigned long __res1:24;
 #ifdef CONFIG_ARM_64
             unsigned long __res2:32;
 #endif
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 2764c072cb..99ac8db233 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -278,10 +278,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
      *
      * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR.
      */
-    /* We could trap ID_DFR0 and tell the guest we don't support
-     * performance monitoring, but Linux doesn't check the ID_DFR0.
-     * Therefore it will read PMCR.
-     *
+    /*
      * We tell the guest we have 0 counters. Unfortunately we must
      * always support PMCCNTR (the cyle counter): we just RAZ/WI for all
      * PM register, which doesn't crash the kernel at least
@@ -294,6 +291,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
+    case HSR_CPREG32(PMMIR):
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
@@ -322,8 +320,32 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
     GENERATE_TID3_INFO(ID_PFR0, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1, dbg32, 1)
+
+    case HSR_CPREG32(ID_DFR0):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_CPREG32(ID_DFR1):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1, mm32, 1)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 91f6db7a32..df9a8b2ae4 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -1252,6 +1252,11 @@ static always_inline bool is_iommu_enabled(const struct domain *d)
     return evaluate_nospec(d->options & XEN_DOMCTL_CDF_iommu);
 }
 
+static inline bool is_vpmu_domain(const struct domain *d)
+{
+    return d->options & XEN_DOMCTL_CDF_vpmu;
+}
+
 #ifdef CONFIG_MEM_PAGING
 # define mem_paging_enabled(d) vm_event_check_ring((d)->vm_event_paging)
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:11:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:11:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428741.1651657 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLl-00007u-N3; Tue, 22 Sep 2026 12:11:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428741.1651657; Tue, 22 Sep 2026 12:11:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLl-00007m-KZ; Tue, 22 Sep 2026 12:11:53 +0000
Received: by outflank-mailman (input) for mailman id 1428741;
 Tue, 22 Sep 2026 12:11:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zLk-00007b-Ed
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:11:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLk-00Axev-0K
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLk-005cmI-1H
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:11:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=4s7ONxRneEnvPTz3AXP67a/hSaMdPA/5Gu5BGct3HFE=; b=SQohIiQSSjH8ZcL0v9nFLnVm3/
	oAlMztK4A855bONqqbPHzqTeXdjoezVpQ4fswbYxuwPc7vj0noqUcL5vHx+q75zr2IO19t6saAf3t
	XZqE4M93iGmvhs3mITtXSUVOe5FBMswwxA8YQMPNP+roBohfBDjeHMVQUSZxh2BMDKtk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: traps: report level 0 faults in panic_PAR()
Message-Id: <E1x8zLk-005cmI-1H@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:11:52 +0000

commit 3375d22835694cf5b6c3da534e64e7669e376390
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 25 08:23:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:57:05 2026 +0200

    xen/arm: traps: report level 0 faults in panic_PAR()
    
    decode_fsc() derives the fault level from the low two bits of the FSC, so
    level 0 is a valid output: FSC_FLT_TRANS is 0x04, i.e. "translation fault,
    level 0 or translation table base register".
    
    This is reachable on arm64 because xen_pgtable is the zeroeth-level root,
    but fsc_level_str() has no case for it and prints " (level invalid)"
    instead. At the time the function was created Xen used only three levels.
    
    Add the missing case. On arm32 the zeroeth level does not exist but FSC
    0 denotes address size fault at translation table base register.
    
    While at it, make decode_fsc() decode also address size faults.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    (cherry picked from commit 4e1f58ea1a20d8a831ad72aa30eafa618dfae750)
---
 xen/arch/arm/include/asm/processor.h | 2 ++
 xen/arch/arm/traps.c                 | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
index a3753c317f..509040a1cd 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -521,6 +521,7 @@ extern register_t __cpu_logical_map[];
 /*
  * 543210 BIT
  * 00XXLL -- XX Fault Level LL
+ * ..00LL -- Address Size Fault LL
  * ..01LL -- Translation Fault LL
  * ..10LL -- Access Fault LL
  * ..11LL -- Permission Fault LL
@@ -534,6 +535,7 @@ extern register_t __cpu_logical_map[];
 #define FSC_TYPE_OTH   (_AC(0x02,U)<<4)
 #define FSC_TYPE_IMPL  (_AC(0x03,U)<<4)
 
+#define FSC_FLT_ADDR_SIZE (0x00)
 #define FSC_FLT_TRANS  (0x04)
 #define FSC_FLT_ACCESS (0x08)
 #define FSC_FLT_PERM   (0x0c)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 0c01f37ad6..344aa21b98 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -307,6 +307,10 @@ static const char *decode_fsc(uint32_t fsc, int *level)
 
     switch ( fsc & 0x3f )
     {
+    case FSC_FLT_ADDR_SIZE ... FSC_FLT_ADDR_SIZE + 3:
+        msg = "Address size fault";
+        *level = fsc & FSC_LL_MASK;
+        break;
     case FSC_FLT_TRANS ... FSC_FLT_TRANS + 3:
         msg = "Translation fault";
         *level = fsc & FSC_LL_MASK;
@@ -363,6 +367,7 @@ static const char *fsc_level_str(int level)
     switch ( level )
     {
     case -1: return "";
+    case 0:  return " at level 0 or TTBR";
     case 1:  return " at level 1";
     case 2:  return " at level 2";
     case 3:  return " at level 3";
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:12:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:12:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428742.1651662 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLv-0000B8-OW; Tue, 22 Sep 2026 12:12:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428742.1651662; Tue, 22 Sep 2026 12:12:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zLv-0000B0-Lr; Tue, 22 Sep 2026 12:12:03 +0000
Received: by outflank-mailman (input) for mailman id 1428742;
 Tue, 22 Sep 2026 12:12:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zLu-0000An-HY
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:12:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLu-00AxgE-0a
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:12:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zLu-005dmf-1X
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:12:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=wxHbts9T7YeSP9wreRikKfIHkMwLKSxIZAtxIn0tlbw=; b=aTbLe+G2mmOl2CqcKHlZQbQnGJ
	b0DMlz9+prXQIYvNXMaUNY9C0ZfSRLsldbxv3Eg40zwnKJhSjzTrIRRn3S3uL3zMMhuFSZAQgrZjy
	SyFEwvIf1xtfrkB29/VSQUsTfqfncio09om+azW/eumshdEqc8VJK3xw8M8cUR6wTElo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: Fix evaluation of parameters for SMCCC calls
Message-Id: <E1x8zLu-005dmf-1X@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:12:02 +0000

commit 781b60f951402ba138e60be3f1e2c5e97d9a63ab
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Aug 31 11:44:35 2026 +0100
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:57:05 2026 +0200

    xen/arm: Fix evaluation of parameters for SMCCC calls
    
    Contrary to what was claimed in commit 67bcf5eae709 ("xen/arm: Simplify type
    handling for SMCCC declarations"), there is an important reason to retain the
    intermediate variable.  It is unsafe to have any logic between the assignment
    of the register variables and the asm() block they're used in.
    
    This logically reverts commit 67bcf5eae709 ("xen/arm: Simplify type handling
    for SMCCC declarations") while retaining the conversions from commit
    7f15d5d13221 ("xen/treewide: More typeof() -> auto conversions").
    
    Adjust __declare_arg_0() to match.  It happens to be safe because it's the
    first register expression once all macros are expanded, but it really should
    be consistent with the others.
    
    Leave a comment explaining why they must be written like this.
    
    Fixes: 67bcf5eae709 ("xen/arm: Simplify type handling for SMCCC declarations")
    Reported-by: Jan Setje-Eilers <Jan.SetjeEilers@oracle.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
    (cherry picked from commit 95302b39430c9d2d4b50c2c63f56629e543b29e6)
---
 xen/arch/arm/include/asm/smccc.h | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 62c6985e73..53cdddb690 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -108,37 +108,52 @@ struct arm_smccc_res {
 #define __constraint_read_6 __constraint_read_5, "r" (arg6)
 #define __constraint_read_7 __constraint_read_6, "r" (arg7)
 
+/*
+ * Macro arguments MUST be evaluated before being assigned to a register
+ * variable.
+ *
+ * This is manual register scheduling for the asm() statement, and any other
+ * logic to evaluate may clobber the already-scheduled registers.
+ */
 #define __declare_arg_0(a0, res)                            \
+    auto __a0 = (uint32_t)(a0);                             \
     struct arm_smccc_res    *___res = (res);                \
-    register unsigned long  arg0 ASM_REG(0) = (uint32_t)(a0)
+    register unsigned long  arg0 ASM_REG(0) = __a0
 
 #define __declare_arg_1(a0, a1, res)                        \
+    auto __a1 = (a1);                                       \
     __declare_arg_0(a0, res);                               \
-    register auto           arg1 ASM_REG(1) = (a1)
+    register auto           arg1 ASM_REG(1) = __a1
 
 #define __declare_arg_2(a0, a1, a2, res)                    \
+    auto __a2 = (a2);                                       \
     __declare_arg_1(a0, a1, res);                           \
-    register auto           arg2 ASM_REG(2) = (a2)
+    register auto           arg2 ASM_REG(2) = __a2
 
 #define __declare_arg_3(a0, a1, a2, a3, res)                \
+    auto __a3 = (a3);                                       \
     __declare_arg_2(a0, a1, a2, res);                       \
-    register auto           arg3 ASM_REG(3) = (a3)
+    register auto           arg3 ASM_REG(3) = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)        \
+    auto __a4 = (a4);                                   \
     __declare_arg_3(a0, a1, a2, a3, res);               \
-    register auto           arg4 ASM_REG(4) = (a4)
+    register auto           arg4 ASM_REG(4) = __a4
 
 #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)    \
+    auto __a5 = (a5);                                   \
     __declare_arg_4(a0, a1, a2, a3, a4, res);           \
-    register auto           arg5 ASM_REG(5) = (a5)
+    register auto           arg5 ASM_REG(5) = __a5
 
 #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)    \
+    auto __a6 = (a6);                                       \
     __declare_arg_5(a0, a1, a2, a3, a4, a5, res);           \
-    register auto           arg6 ASM_REG(6) = (a6)
+    register auto           arg6 ASM_REG(6) = __a6
 
 #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)    \
+    auto __a7 = (a7);                                           \
     __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);           \
-    register auto           arg7 ASM_REG(7) = (a7)
+    register auto           arg7 ASM_REG(7) = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:12:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:12:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428743.1651666 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zM6-0000Dp-Pg; Tue, 22 Sep 2026 12:12:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428743.1651666; Tue, 22 Sep 2026 12:12:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zM6-0000Dh-NE; Tue, 22 Sep 2026 12:12:14 +0000
Received: by outflank-mailman (input) for mailman id 1428743;
 Tue, 22 Sep 2026 12:12:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zM4-0000DS-KX
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:12:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zM4-00AxhB-0q
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:12:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zM4-005eoj-1o
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:12:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=DTpeC+NH8Bk6ZK7uY/QIFHYaZ7Qeg0i4WwPAJTMPBII=; b=AbJeC672cCaQEV3wE+mxypKWd9
	hHSMHR0c+3znrEbe2PRTBkFrYcwNzJA7QPMvjhwDTR1gBPZZsvp87oQ7Q3u4f3a08QNTnxhDFodQB
	DgHsSLJbu6ks+0nTquh5hMCC5QlBvZKsgqyA5aZqYc3BsaLrvYYyQwHqzyx93Csr+Dr0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.22] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x8zM4-005eoj-1o@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:12:12 +0000

commit 3ffc21956e44ca6ed48c18b7daeecaf9ec6c837d
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 13:57:05 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681)
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.22


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:22:05 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:22:05 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428748.1651671 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zVb-0001wQ-Gp; Tue, 22 Sep 2026 12:22:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428748.1651671; Tue, 22 Sep 2026 12:22:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zVb-0001wI-Dw; Tue, 22 Sep 2026 12:22:03 +0000
Received: by outflank-mailman (input) for mailman id 1428748;
 Tue, 22 Sep 2026 12:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zVa-0001w6-1s
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zVZ-00Ayci-1j
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zVZ-006erO-2e
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+Hk+sqjI5eTQQJTHB5BPo7mXEuv5H5qqTIx+SbDwtaM=; b=ojUk0SK7vKXJMmGyrJwDRupWck
	PnQLQFzseEW2NMzhkhnUPT30gFjUIMyrQi0Zp7iiMjbEWfrnqQcCuLl14ACjh5tRwp9CNSElNZ/0P
	V1YJmQozMzxzG5K7QG+0WVc3m66At73MwydyDN0QcQbeq2xAc9R8/ueL32aYtvqgkm+I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/arm: mask debug exceptions in initial AArch64 guest state
Message-Id: <E1x8zVZ-006erO-2e@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:22:01 +0000

commit 75f866e9f7656f2c2da71c9412bc5d08e0591ae8
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Fri Jun 19 20:37:38 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:00:01 2026 +0200

    xen/arm: mask debug exceptions in initial AArch64 guest state
    
    PSR_GUEST64_INIT currently masks SError, IRQ and FIQ, but leaves debug
    exceptions unmasked. Both the AArch64 Linux boot protocol and PSCI entry
    requirements expect PSTATE.DAIF to be masked.
    
    Add PSR_DBG_MASK to PSR_GUEST64_INIT. This fixes the initial AArch64 guest
    entry state as well as virtual PSCI CPU_ON and SYSTEM_SUSPEND resume entry.
    
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    (cherry picked from commit ad8663a75aa8db4255d6690bfc210d559edc9f5b)
---
 xen/include/public/arch-arm.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index e2412a1747..d41100dcb0 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -408,7 +408,8 @@ typedef uint64_t xen_callback_t;
  * zImage kernels on aarch32.
  */
 #define PSR_GUEST32_INIT (PSR_Z|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
-#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
+#define PSR_GUEST64_INIT \
+    (PSR_DBG_MASK|PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
 
 #define SCTLR_GUEST_INIT    xen_mk_ullong(0x00c50078)
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:22:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:22:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428749.1651673 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zVl-0001ya-HU; Tue, 22 Sep 2026 12:22:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428749.1651673; Tue, 22 Sep 2026 12:22:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zVl-0001yS-Ez; Tue, 22 Sep 2026 12:22:13 +0000
Received: by outflank-mailman (input) for mailman id 1428749;
 Tue, 22 Sep 2026 12:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zVj-0001yH-Vh
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zVj-00Ayde-21
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zVj-006gD6-2x
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=8AbwF/5A8ygDngvggyfBTR6LNSQv1wrkZP6/YjbDalo=; b=TS/XfC6umcmHmwmfT5wjK3rJzf
	Zf3mcobkXw8y21uS8STV6tZL/IvRyTiiYzBo9ll30H21bw8mqvGk4kVgE3NLjaSVsi63V7CM4K8Lo
	I1XF5dPiGxpm6a3OedFReHdbnjsfZ+3koQqNdUDHYmDbwdO6vCgMywCvP0atXrlMh4tY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
Message-Id: <E1x8zVj-006gD6-2x@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:22:11 +0000

commit ec0c241602dfc7ec0a4f39cf3633a326d3e3ecc3
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Wed Aug 5 14:11:24 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:11 2026 +0200

    xen/dt: reject "xen,static-mem" when CONFIG_STATIC_MEMORY is disabled
    
    process_domain_node() parses "xen,static-mem" regardless of
    CONFIG_STATIC_MEMORY. With the feature off, init_staticmem_pages() is a
    no-op stub, so boot carries on until construct_domU() reaches the
    ASSERT_UNREACHABLE() stubs of allocate_static_memory() /
    assign_static_memory_11(): a debug build trips the assertion, a production
    build gives the domain no memory at all.
    
    Bail out at parse time instead, like process_shm_node() already does for
    CONFIG_STATIC_SHM.
    
    Fixes: 41c031ff437b ("xen/arm: introduce domain on Static Allocation")
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Acked-by: Bertrand Marquis <bertrand.marquis@arm.com>
    [michal: adjust for code movement]
    (cherry picked from commit e888192d133eeec8a94275eaf4194117f198a7e2)
---
 xen/common/device-tree/bootfdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/bootfdt.c
index 9ce7699833..70d79cfc06 100644
--- a/xen/common/device-tree/bootfdt.c
+++ b/xen/common/device-tree/bootfdt.c
@@ -471,6 +471,12 @@ static int __init process_domain_node(const void *fdt, int node,
         /* No "xen,static-mem" present. */
         return 0;
 
+    if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) )
+    {
+        printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n");
+        return -EINVAL;
+    }
+
     return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells,
                                    size_cells, bootinfo_get_reserved_mem(),
                                    MEMBANK_STATIC_DOMAIN);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:22:22 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:22:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428751.1651679 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zVu-00020y-JD; Tue, 22 Sep 2026 12:22:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428751.1651679; Tue, 22 Sep 2026 12:22:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zVu-00020q-GH; Tue, 22 Sep 2026 12:22:22 +0000
Received: by outflank-mailman (input) for mailman id 1428751;
 Tue, 22 Sep 2026 12:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zVu-00020h-2g
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zVt-00AyeZ-2L
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zVu-006hZG-02
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Xxzl5NV9tjub05bbJK6yxoYvvL5nKuxAbJkMfCT9zNI=; b=F+ZTEWwrwmAe0qRWC+N4RikzR7
	qkXznDKVpol9FMs+QEbuUqTHPjQOonFwbR2G2IzoDAu1VAeeoYxt6VH5VzU14PkSCzkMWvH+edhWN
	LaHChSj9uHog7/jbb8S63px7M6Q/VlY2YSGazcyzwRtH2KkVPgmTSPSLqvFn4GNgSzR0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/arm: propagate secondary GIC initialization failures
Message-Id: <E1x8zVu-006hZG-02@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:22:22 +0000

commit 99cdf4a4d468661a094102c9d5800fb470100771
Author:     Mykola Kvach <mykola_kvach@epam.com>
AuthorDate: Mon Aug 10 22:41:46 2026 +0300
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: propagate secondary GIC initialization failures
    
    The GICv3 secondary_init() callback can fail while discovering or
    waking a Redistributor, enabling LPIs, or setting up an ITS collection.
    gic_init_secondary_cpu() currently discards that status. start_secondary()
    then marks the CPU online even though its per-CPU GIC interface may be
    unusable.
    
    Return the callback status through the common GIC layer. Have
    start_secondary() report the failure and stop the affected CPU before it
    updates system features or is added to cpu_online_map.
    
    Fixes: bc183a0235e0 ("xen/arm: Add support for GIC v3")
    Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit 0102b592f46ff3f0784e693efa0b812551345271)
---
 xen/arch/arm/gic.c             | 10 ++++++++--
 xen/arch/arm/include/asm/gic.h |  2 +-
 xen/arch/arm/smpboot.c         | 11 +++++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index acf61a4de3..bfdd35afb5 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -279,11 +279,17 @@ void smp_send_state_dump(unsigned int cpu)
 }
 
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
-void gic_init_secondary_cpu(void)
+int gic_init_secondary_cpu(void)
 {
-    gic_hw_ops->secondary_init();
+    int rc = gic_hw_ops->secondary_init();
+
+    if ( rc )
+        return rc;
+
     /* Clear LR mask for secondary cpus */
     clear_cpu_lr_mask();
+
+    return 0;
 }
 
 /* Shut down the per-CPU GIC interface */
diff --git a/xen/arch/arm/include/asm/gic.h b/xen/arch/arm/include/asm/gic.h
index 066a00c676..b24f1ecd97 100644
--- a/xen/arch/arm/include/asm/gic.h
+++ b/xen/arch/arm/include/asm/gic.h
@@ -291,7 +291,7 @@ extern void gic_preinit(void);
 /* Bring up the interrupt controller, and report # cpus attached */
 extern void gic_init(void);
 /* Bring up a secondary CPU's per-CPU GIC interface */
-extern void gic_init_secondary_cpu(void);
+extern int gic_init_secondary_cpu(void);
 /* Take down a CPU's per-CPU GIC interface */
 extern void gic_disable_cpu(void);
 /* setup the gic virtual interface for a guest */
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 0f9300aad8..145acf52ec 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -325,6 +325,7 @@ smp_prepare_cpus(void)
 void asmlinkage start_secondary(void)
 {
     unsigned int cpuid = init_data.cpuid;
+    int rc;
 
     memset(get_cpu_info(), 0, sizeof (struct cpu_info));
 
@@ -372,6 +373,14 @@ void asmlinkage start_secondary(void)
         stop_cpu();
     }
 
+    rc = gic_init_secondary_cpu();
+    if ( rc )
+    {
+        printk(XENLOG_ERR "CPU%u: Failed to initialize the GIC: %d\n",
+               smp_processor_id(), rc);
+        stop_cpu();
+    }
+
     /*
      * system features must be updated only if we do not stop the core or
      * we might disable features due to a non used core (for example when
@@ -379,8 +388,6 @@ void asmlinkage start_secondary(void)
      */
     update_system_features(&current_cpu_data);
 
-    gic_init_secondary_cpu();
-
     set_current(idle_vcpu[cpuid]);
 
     /* Run local notifiers */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:22:32 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:22:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428752.1651682 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zW4-00023K-KK; Tue, 22 Sep 2026 12:22:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428752.1651682; Tue, 22 Sep 2026 12:22:32 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zW4-00023C-Hf; Tue, 22 Sep 2026 12:22:32 +0000
Received: by outflank-mailman (input) for mailman id 1428752;
 Tue, 22 Sep 2026 12:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zW4-000235-5f
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zW3-00AyfX-2e
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zW4-006ipw-0M
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=KNlYoc5xHPPzcxrRAEsFaPMQecDwBGvxPX57rtcyoSo=; b=1PSMCDvyfVLlmmrL9iK9FdkYBW
	J9dib66nPZXmrhfOslj2TLUc36Ip3hBU+8qFZIsB90Zf/c8ja5NumHHvpmb4YRvYPz+Cv0lTLq+HO
	ctb9p5fxOc936Ty48LTAeg7y+BWpSYJ77p5DG4zhLhLQuGHYArS5l60bijb4dNTV051U=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
Message-Id: <E1x8zW4-006ipw-0M@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:22:32 +0000

commit 1633c8148acbf9fccfbd06a9aaaa16f71b7856b2
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 11 15:08:18 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: drop incorrect EL0 accessibility comments for PMINTEN{SET,CLR}
    
    The comments on the PMINTENSET/PMINTENCLR cases claim that an EL0 access
    may be trapped to EL2 when MDCR_EL2.TPM is set, and that such a case is
    handled. Both are inaccurate. PMINTENSET_EL1/PMINTENCLR_EL1 are accessible
    at EL1 and above only, with no enable making them accessible at EL0.
    
    Arm ARM (DDI 0487M.b) D1.4.5.6 "Prioritization of Synchronous
    exceptions" orders the two exceptions. An access that is never
    accessible at the current Exception level regardless of any enables or
    traps is priority 18, whereas an exception taken to EL2 as the result of
    a configuration control in MDCR_EL2 is priority 24. An EL0 access is
    therefore UNDEFINED and taken to EL1.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    (cherry picked from commit 87a8a5728e5936f088c94bd7960c70f9b1cef36e)
---
 xen/arch/arm/arm64/vsysreg.c | 4 ----
 xen/arch/arm/vcpreg.c        | 1 -
 2 files changed, 5 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index c73b2c95ce..207c868059 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,10 +229,6 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
-        /*
-         * Accessible from EL1 only, but if EL0 trap happens handle as
-         * undef.
-         */
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 0b336875a4..2ed27084c1 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -294,7 +294,6 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
-        /* EL1 only, however MDCR_EL2.TPM==1 means EL0 may trap here also. */
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:22:42 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:22:42 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428753.1651686 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zWE-00026R-Mh; Tue, 22 Sep 2026 12:22:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428753.1651686; Tue, 22 Sep 2026 12:22:42 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zWE-00026J-KC; Tue, 22 Sep 2026 12:22:42 +0000
Received: by outflank-mailman (input) for mailman id 1428753;
 Tue, 22 Sep 2026 12:22:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zWE-00026C-91
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:22:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zWD-00AygP-2z
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zWE-006k0C-0g
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=FpyU4LIaPt0H3eLJgxDugHN+i5V0eqeOWTgxA4X9918=; b=J+xL09BkW7/9zTCkYa49KhHzgN
	osVbWLEl4E4sB+QW8ZPFDDuTk5VOQ2YC2Eq3jGkXvsYFtC4rskffRCiHtlWGVTht5yP+hJF5u934j
	puzmdeOnqLoDuDBHpw4263OE+FD9y9j6dDlpzQsvu5VD52izHBB7Nqt+//JolEcHY/RQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
Message-Id: <E1x8zWE-006k0C-0g@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:22:42 +0000

commit 80bc532b38d6a04fbebba86fcefd66de0ee37545
Author:     Hirokazu Takahashi <taka@valinux.co.jp>
AuthorDate: Wed Aug 26 12:55:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: Hide PMU registers from the guest, when the vPMU feature is disabled
    
    On ARMv8.4-A and newer platforms, booting Dom0 Linux with ACPI enabled
    causes the domain to probe advanced PMU feature based on system ID
    register ID_AA64DFR0_EL1. During this probe, Linux accesses PMMIR_EL1,
    which causes unhandled register traps and crashes the domain.
    
    To address this issue, implement the following:
    
    - Add emulation for ID_AA64DFR{0,1}_EL1, ID_DFR{0,1}_EL1 and
      ID_DFR{0,1} register accesses for guest domains.
    - Hide PMU registers from a guest domain when its vPMU feature is
      disabled.
    - Proactively make SPE, TRBE, BRBE, Trace Extensions, SPMU, ITE and
      EBEP inaccessible to arm64 guest domains and hide TraceFilt,
      MMapTrc and CopTrc to arm32 guest domains, as they could
      potentially cause similar issues.
    
    Fixes: dbb948110a0e ("xen: Expose the PMU to the guests")
    Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
    Fixes: 3669a1cb9598 ("xen/arm: create a cpuinfo structure for guest")
    Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit b836ef686efe4d01fb54a12cb1e9df7ec0494201)
---
 xen/arch/arm/arm64/vsysreg.c          | 59 ++++++++++++++++++++++++++++++++---
 xen/arch/arm/cpufeature.c             | 18 +++++++++++
 xen/arch/arm/domain.c                 |  2 +-
 xen/arch/arm/include/asm/arm64/hsr.h  |  1 +
 xen/arch/arm/include/asm/cpregs.h     |  1 +
 xen/arch/arm/include/asm/cpufeature.h | 27 +++++++++++-----
 xen/arch/arm/vcpreg.c                 | 34 ++++++++++++++++----
 xen/include/xen/sched.h               |  5 +++
 8 files changed, 129 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
index 207c868059..1a8650f863 100644
--- a/xen/arch/arm/arm64/vsysreg.c
+++ b/xen/arch/arm/arm64/vsysreg.c
@@ -229,6 +229,7 @@ void do_sysreg(struct cpu_user_regs *regs,
      */
     case HSR_SYSREG_PMINTENSET_EL1:
     case HSR_SYSREG_PMINTENCLR_EL1:
+    case HSR_SYSREG_PMMIR_EL1:
         return handle_raz_wi(regs, regidx, hsr.sysreg.read, hsr, 1);
     case HSR_SYSREG_PMUSERENR_EL0:
         /* RO at EL0. RAZ/WI at EL1 */
@@ -302,8 +303,32 @@ void do_sysreg(struct cpu_user_regs *regs,
     GENERATE_TID3_INFO(ID_PFR0_EL1, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1_EL1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2_EL1, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0_EL1, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1_EL1, dbg32, 1)
+
+    case HSR_SYSREG_ID_DFR0_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_DFR1_EL1:
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0_EL1, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0_EL1, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1_EL1, mm32, 1)
@@ -344,8 +369,34 @@ void do_sysreg(struct cpu_user_regs *regs,
     }
 
     GENERATE_TID3_INFO(ID_AA64PFR1_EL1, pfr64, 1)
-    GENERATE_TID3_INFO(ID_AA64DFR0_EL1, dbg64, 0)
-    GENERATE_TID3_INFO(ID_AA64DFR1_EL1, dbg64, 1)
+
+    case HSR_SYSREG_ID_AA64DFR0_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg64.pmu_ver = 0;
+            info_dbg64.pmss = 0;
+            info_dbg64.mtpmu = 0;
+            info_dbg64.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[0]);
+    }
+
+    case HSR_SYSREG_ID_AA64DFR1_EL1:
+    {
+        union cpuinfo_dbg64 info_dbg64 = domain_cpuinfo.dbg64;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg64.pmicntr = 0;
+
+        return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, 1,
+                                  info_dbg64.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AA64ISAR0_EL1, isa64, 0)
     GENERATE_TID3_INFO(ID_AA64ISAR1_EL1, isa64, 1)
     GENERATE_TID3_INFO(ID_AA64MMFR0_EL1, mm64, 0)
diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 94d14fb6a9..8d8cd19a96 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -219,8 +219,26 @@ static int __init create_domain_cpuinfo(void)
     domain_cpuinfo.isa64.api = 0;
     domain_cpuinfo.isa64.gpa = 0;
     domain_cpuinfo.isa64.gpi = 0;
+
+    /* Hide SPE, DPFZS, TRBE, BRBE, Trace Extensions, SPMU, ITE and EBEP */
+    domain_cpuinfo.dbg64.trace_ver = 0;
+    domain_cpuinfo.dbg64.pms_ver = 0;
+    domain_cpuinfo.dbg64.dpfzs = 0;
+    domain_cpuinfo.dbg64.trace_filt = 0;
+    domain_cpuinfo.dbg64.trace_buffer = 0;
+    domain_cpuinfo.dbg64.ext_trc_buff = 0;
+    domain_cpuinfo.dbg64.brbe = 0;
+    domain_cpuinfo.dbg64.syspmuid = 0;
+    domain_cpuinfo.dbg64.spmu = 0;
+    domain_cpuinfo.dbg64.ite = 0;
+    domain_cpuinfo.dbg64.ebep = 0;
 #endif
 
+    /* Hide Trace Extensions for AArch32 domain */
+    domain_cpuinfo.dbg32.coptrc = 0;
+    domain_cpuinfo.dbg32.mmaptrc = 0;
+    domain_cpuinfo.dbg32.tracefilt = 0;
+
     /* Hide AMU support */
 #ifdef CONFIG_ARM_64
     domain_cpuinfo.pfr64.amu = 0;
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 2d00b4ce1d..f0a92ae219 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -555,7 +555,7 @@ int arch_vcpu_create(struct vcpu *v)
     v->arch.hcr_el2 = get_default_hcr_flags();
 
     v->arch.mdcr_el2 = HDCR_TDRA | HDCR_TDOSA | HDCR_TDA;
-    if ( !(v->domain->options & XEN_DOMCTL_CDF_vpmu) )
+    if ( !is_vpmu_domain(v->domain) )
         v->arch.mdcr_el2 |= HDCR_TPM | HDCR_TPMCR;
 
     if ( (rc = vcpu_vgic_init(v)) != 0 )
diff --git a/xen/arch/arm/include/asm/arm64/hsr.h b/xen/arch/arm/include/asm/arm64/hsr.h
index 1495ccddea..ed18184cc7 100644
--- a/xen/arch/arm/include/asm/arm64/hsr.h
+++ b/xen/arch/arm/include/asm/arm64/hsr.h
@@ -84,6 +84,7 @@
 #define HSR_SYSREG_FAR_EL1        HSR_SYSREG(3,0,c6, c0,0)
 #define HSR_SYSREG_PMINTENSET_EL1 HSR_SYSREG(3,0,c9,c14,1)
 #define HSR_SYSREG_PMINTENCLR_EL1 HSR_SYSREG(3,0,c9,c14,2)
+#define HSR_SYSREG_PMMIR_EL1      HSR_SYSREG(3,0,c9,c14,6)
 #define HSR_SYSREG_MAIR_EL1       HSR_SYSREG(3,0,c10,c2,0)
 #define HSR_SYSREG_AMAIR_EL1      HSR_SYSREG(3,0,c10,c3,0)
 #define HSR_SYSREG_ICC_SGI1R_EL1  HSR_SYSREG(3,0,c12,c11,5)
diff --git a/xen/arch/arm/include/asm/cpregs.h b/xen/arch/arm/include/asm/cpregs.h
index aec9e8f329..01204c06a4 100644
--- a/xen/arch/arm/include/asm/cpregs.h
+++ b/xen/arch/arm/include/asm/cpregs.h
@@ -244,6 +244,7 @@
 #define PMINTENSET      p15,0,c9,c14,1  /* Perf. Mon. Interrupt Enable Set Register */
 #define PMINTENCLR      p15,0,c9,c14,2  /* Perf. Mon. Interrupt Enable Clear Register */
 #define PMOVSSET        p15,0,c9,c14,3  /* Perf. Mon. Overflow Flag Status Set register */
+#define PMMIR           p15,0,c9,c14,6  /* Perf. Mon. Machine Identification Register */
 
 /* CP15 CR10: */
 #define MAIR0           p15,0,c10,c2,0  /* Memory Attribute Indirection Register 0 AKA PRRR */
diff --git a/xen/arch/arm/include/asm/cpufeature.h b/xen/arch/arm/include/asm/cpufeature.h
index 50297e53d9..5c04a2970f 100644
--- a/xen/arch/arm/include/asm/cpufeature.h
+++ b/xen/arch/arm/include/asm/cpufeature.h
@@ -208,7 +208,7 @@ struct cpuinfo_arm {
         };
     } pfr64;
 
-    union {
+    union cpuinfo_dbg64 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -216,19 +216,31 @@ struct cpuinfo_arm {
             unsigned long trace_ver:4;
             unsigned long pmu_ver:4;
             unsigned long brps:4;
-            unsigned long __res0:4;
+            unsigned long pmss:4;
             unsigned long wrps:4;
             unsigned long __res1:4;
             unsigned long ctx_cmps:4;
             unsigned long pms_ver:4;
             unsigned long double_lock:4;
             unsigned long trace_filt:4;
-            unsigned long __res2:4;
+            unsigned long trace_buffer:4;
             unsigned long mtpmu:4;
-            unsigned long __res3:12;
+            unsigned long brbe:4;
+            unsigned long ext_trc_buff:4;
+            unsigned long hpmn0:4;
 
             /* DFR1 */
-            unsigned long __res4:64;
+            unsigned long syspmuid:8;
+            unsigned long brps1:8;
+            unsigned long wrps1:8;
+            unsigned long ctx_cmps1:8;
+            unsigned long spmu:4;
+            unsigned long pmicntr:4;
+            unsigned long able:4;
+            unsigned long ite:4;
+            unsigned long ebep:4;
+            unsigned long dpfzs:4;
+            unsigned long abl_cmps:8;
         };
     } dbg64;
 
@@ -401,7 +413,7 @@ struct cpuinfo_arm {
         };
     } pfr32;
 
-    union {
+    union cpuinfo_dbg32 {
         register_t bits[2];
         struct {
             /* DFR0 */
@@ -419,7 +431,8 @@ struct cpuinfo_arm {
 
             /* DFR1 */
             unsigned long mtpmu:4;
-            unsigned long __res1:28;
+            unsigned long hpmn0:4;
+            unsigned long __res1:24;
 #ifdef CONFIG_ARM_64
             unsigned long __res2:32;
 #endif
diff --git a/xen/arch/arm/vcpreg.c b/xen/arch/arm/vcpreg.c
index 2ed27084c1..a946f46495 100644
--- a/xen/arch/arm/vcpreg.c
+++ b/xen/arch/arm/vcpreg.c
@@ -278,10 +278,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
      *
      * NB: Both MDCR_EL2.TPM and MDCR_EL2.TPMCR cause trapping of PMCR.
      */
-    /* We could trap ID_DFR0 and tell the guest we don't support
-     * performance monitoring, but Linux doesn't check the ID_DFR0.
-     * Therefore it will read PMCR.
-     *
+    /*
      * We tell the guest we have 0 counters. Unfortunately we must
      * always support PMCCNTR (the cyle counter): we just RAZ/WI for all
      * PM register, which doesn't crash the kernel at least
@@ -294,6 +291,7 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
             return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMINTENSET):
     case HSR_CPREG32(PMINTENCLR):
+    case HSR_CPREG32(PMMIR):
         return handle_raz_wi(regs, regidx, cp32.read, hsr, 1);
     case HSR_CPREG32(PMCR):
     case HSR_CPREG32(PMCNTENSET):
@@ -322,8 +320,32 @@ void do_cp15_32(struct cpu_user_regs *regs, const union hsr hsr)
     GENERATE_TID3_INFO(ID_PFR0, pfr32, 0)
     GENERATE_TID3_INFO(ID_PFR1, pfr32, 1)
     GENERATE_TID3_INFO(ID_PFR2, pfr32, 2)
-    GENERATE_TID3_INFO(ID_DFR0, dbg32, 0)
-    GENERATE_TID3_INFO(ID_DFR1, dbg32, 1)
+
+    case HSR_CPREG32(ID_DFR0):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+            info_dbg32.perfmon = 0;
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[0]);
+    }
+
+    case HSR_CPREG32(ID_DFR1):
+    {
+        union cpuinfo_dbg32 info_dbg32 = domain_cpuinfo.dbg32;
+
+        if ( !is_vpmu_domain(v->domain) )
+        {
+            info_dbg32.mtpmu = 0;
+            info_dbg32.hpmn0 = 0;
+        }
+
+        return handle_ro_read_val(regs, regidx, cp32.read, hsr, 1,
+                                  info_dbg32.bits[1]);
+    }
+
     GENERATE_TID3_INFO(ID_AFR0, aux32, 0)
     GENERATE_TID3_INFO(ID_MMFR0, mm32, 0)
     GENERATE_TID3_INFO(ID_MMFR1, mm32, 1)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index df8828706d..dfcb4065fb 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -1215,6 +1215,11 @@ static always_inline bool is_iommu_enabled(const struct domain *d)
     return evaluate_nospec(d->options & XEN_DOMCTL_CDF_iommu);
 }
 
+static inline bool is_vpmu_domain(const struct domain *d)
+{
+    return d->options & XEN_DOMCTL_CDF_vpmu;
+}
+
 #ifdef CONFIG_MEM_PAGING
 # define mem_paging_enabled(d) vm_event_check_ring((d)->vm_event_paging)
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:22:52 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:22:52 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428754.1651690 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zWO-00028j-OG; Tue, 22 Sep 2026 12:22:52 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428754.1651690; Tue, 22 Sep 2026 12:22:52 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zWO-00028b-LX; Tue, 22 Sep 2026 12:22:52 +0000
Received: by outflank-mailman (input) for mailman id 1428754;
 Tue, 22 Sep 2026 12:22:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zWO-00028V-Bh
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:22:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zWO-00AyjL-01
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zWO-006lEe-0z
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:22:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+d9iS0XkWl6M/p7vvR2rsB7MqOiaRqKlYeF6frhazcI=; b=Os+EAfnpm/m3muqIj5hdLbqZgT
	A9LsJ0F6Rm02ByQw/FqUwLM5OKSiqmgDT5FyrLteksWc2GxyqwfWAnVkditxB8DaQxI2ht3Inpf6N
	qiaKxu1ycq38wsElz1YKgRZLNcRANIWOyFt/esGkWXG45He+mEHIDq/9vg/tCTRcPJHE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/arm: traps: report level 0 faults in panic_PAR()
Message-Id: <E1x8zWO-006lEe-0z@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:22:52 +0000

commit c1a06e5121b3202a96990633b4a95e0adb625808
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Aug 25 08:23:28 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: traps: report level 0 faults in panic_PAR()
    
    decode_fsc() derives the fault level from the low two bits of the FSC, so
    level 0 is a valid output: FSC_FLT_TRANS is 0x04, i.e. "translation fault,
    level 0 or translation table base register".
    
    This is reachable on arm64 because xen_pgtable is the zeroeth-level root,
    but fsc_level_str() has no case for it and prints " (level invalid)"
    instead. At the time the function was created Xen used only three levels.
    
    Add the missing case. On arm32 the zeroeth level does not exist but FSC
    0 denotes address size fault at translation table base register.
    
    While at it, make decode_fsc() decode also address size faults.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
    (cherry picked from commit 4e1f58ea1a20d8a831ad72aa30eafa618dfae750)
---
 xen/arch/arm/include/asm/processor.h | 2 ++
 xen/arch/arm/traps.c                 | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
index 2405616534..58f673cb6b 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -513,6 +513,7 @@ extern register_t __cpu_logical_map[];
 /*
  * 543210 BIT
  * 00XXLL -- XX Fault Level LL
+ * ..00LL -- Address Size Fault LL
  * ..01LL -- Translation Fault LL
  * ..10LL -- Access Fault LL
  * ..11LL -- Permission Fault LL
@@ -526,6 +527,7 @@ extern register_t __cpu_logical_map[];
 #define FSC_TYPE_OTH   (_AC(0x02,U)<<4)
 #define FSC_TYPE_IMPL  (_AC(0x03,U)<<4)
 
+#define FSC_FLT_ADDR_SIZE (0x00)
 #define FSC_FLT_TRANS  (0x04)
 #define FSC_FLT_ACCESS (0x08)
 #define FSC_FLT_PERM   (0x0c)
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 4b7ccdf485..f08c1390af 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -307,6 +307,10 @@ static const char *decode_fsc(uint32_t fsc, int *level)
 
     switch ( fsc & 0x3f )
     {
+    case FSC_FLT_ADDR_SIZE ... FSC_FLT_ADDR_SIZE + 3:
+        msg = "Address size fault";
+        *level = fsc & FSC_LL_MASK;
+        break;
     case FSC_FLT_TRANS ... FSC_FLT_TRANS + 3:
         msg = "Translation fault";
         *level = fsc & FSC_LL_MASK;
@@ -363,6 +367,7 @@ static const char *fsc_level_str(int level)
     switch ( level )
     {
     case -1: return "";
+    case 0:  return " at level 0 or TTBR";
     case 1:  return " at level 1";
     case 2:  return " at level 2";
     case 3:  return " at level 3";
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:23:03 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:23:03 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428755.1651693 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zWZ-0002BV-PO; Tue, 22 Sep 2026 12:23:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428755.1651693; Tue, 22 Sep 2026 12:23:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x8zWZ-0002BM-Mt; Tue, 22 Sep 2026 12:23:03 +0000
Received: by outflank-mailman (input) for mailman id 1428755;
 Tue, 22 Sep 2026 12:23:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x8zWY-0002BB-ES
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:23:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zWY-00AykO-0J
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:23:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x8zWY-006mVA-1F
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:23:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=TYhCES4UFW2QT22u7r+nd6txmRfX5ERBUJTLXAj204g=; b=ADdaqNQsn6Oj7pp/ClbNJcsUbc
	FElMESnF2vmO37t5hc+cCzUvmD7IjyXRvynB7PpBX0WdDcbH3fhFlai8XyxSgLGpIrfek0ydA2o20
	UGqsn+daJUi4ifzEcLKG5YHT9hIUuTOYwZr2aHBj5ZanrM5gPyJavlgIrIA2W5RaWP+s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen stable-4.20] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
Message-Id: <E1x8zWY-006mVA-1F@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:23:02 +0000

commit f9c21d1718f88e357867d2afa3840960269a6126
Author:     Julian Vetter <julian.vetter@vates.tech>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@amd.com>
CommitDate: Mon Sep 21 14:04:44 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    (cherry picked from commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681)
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20


From xen-changelog-bounces@lists.xenproject.org Tue Sep 22 12:55:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 22 Sep 2026 12:55:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1428789.1651726 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x901X-0008Ph-Kr; Tue, 22 Sep 2026 12:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1428789.1651726; Tue, 22 Sep 2026 12:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x901X-0008PX-H3; Tue, 22 Sep 2026 12:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1428789;
 Tue, 22 Sep 2026 12:55:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x901V-0008PM-SG
 for xen-changelog@lists.xenproject.org; Tue, 22 Sep 2026 12:55:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x901V-00B246-0m
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x901V-00ATt6-1h
 for xen-changelog@lists.xenproject.org;
 Tue, 22 Sep 2026 12:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=JnNuYUohCVV18F7EOwRteHNxLsxTNOR38pf0avPz6ls=; b=Sz7fln+Gf5neLg/OADmPz1tGyw
	hU+blkly59yKhs9OaooyiPhP6DBxFxrLqLwPCiPfoiV+f9LfABgV0Ukz+gqI6vf+jhuJ3rTOf0utU
	j0hyP3oecKyVvXChowZ7o6zO6qEK+36ddyrBpWunUrJrx0+nXxroffiTAXmOCoe0hu3M=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] tools/libxenguest: remove Mini-OS specific parts
Message-Id: <E1x901V-00ATt6-1h@xenbits.xenproject.org>
Date: Tue, 22 Sep 2026 12:55:01 +0000

commit 487f7e945a9a31ba15e107843efe8a382109aacf
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Tue Sep 22 09:27:08 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Sep 22 11:36:15 2026 +0100

    tools/libxenguest: remove Mini-OS specific parts
    
    The last Mini-OS use case of libxenguest is gone, so remove the
    Mini-OS specific parts of libxenguest.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/libs/guest/Makefile.common                  | 15 -------
 tools/libs/guest/xg_dom_decompress_unsafe.c       | 48 -----------------------
 tools/libs/guest/xg_dom_decompress_unsafe.h       | 28 -------------
 tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c | 14 -------
 tools/libs/guest/xg_dom_decompress_unsafe_lz4.c   | 39 ------------------
 tools/libs/guest/xg_dom_decompress_unsafe_lzma.c  | 14 -------
 tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c | 44 ---------------------
 tools/libs/guest/xg_dom_decompress_unsafe_xz.c    | 46 ----------------------
 tools/libs/guest/xg_dom_decompress_unsafe_zstd.c  | 44 ---------------------
 9 files changed, 292 deletions(-)

diff --git a/tools/libs/guest/Makefile.common b/tools/libs/guest/Makefile.common
index 86b1f160e5..47b3a52360 100644
--- a/tools/libs/guest/Makefile.common
+++ b/tools/libs/guest/Makefile.common
@@ -1,8 +1,3 @@
-ifeq ($(CONFIG_LIBXC_MINIOS),y)
-# Save/restore of a domain is currently incompatible with a stubdom environment
-override CONFIG_MIGRATE := n
-endif
-
 OBJS-y += xg_private.o
 OBJS-y += xg_domain.o
 OBJS-y += xg_suspend.o
@@ -55,16 +50,6 @@ OBJS-$(CONFIG_X86)     += xg_dom_x86.o
 OBJS-$(CONFIG_X86)     += xg_cpuid_x86.o
 OBJS-$(CONFIG_ARM)     += xg_dom_arm.o
 
-ifeq ($(CONFIG_LIBXC_MINIOS),y)
-OBJS-y                 += xg_dom_decompress_unsafe.o
-OBJS-y                 += xg_dom_decompress_unsafe_bzip2.o
-OBJS-y                 += xg_dom_decompress_unsafe_lz4.o
-OBJS-y                 += xg_dom_decompress_unsafe_lzma.o
-OBJS-y                 += xg_dom_decompress_unsafe_lzo1x.o
-OBJS-y                 += xg_dom_decompress_unsafe_xz.o
-OBJS-y                 += xg_dom_decompress_unsafe_zstd.o
-endif
-
 CFLAGS += -D__XEN_TOOLS__
 CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += -iquote ../../../xen/common/libelf
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe.c b/tools/libs/guest/xg_dom_decompress_unsafe.c
deleted file mode 100644
index 21d964787d..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-static struct xc_dom_image *unsafe_dom;
-static unsigned char *output_blob;
-static unsigned int output_size;
-
-static void unsafe_error(const char *msg)
-{
-    xc_dom_panic(unsafe_dom->xch, XC_INVALID_KERNEL, "%s", msg);
-}
-
-static int unsafe_flush(void *src, unsigned int size)
-{
-    void *n = realloc(output_blob, output_size + size);
-    if (!n)
-        return -1;
-    output_blob = n;
-
-    memcpy(&output_blob[output_size], src, size);
-    output_size += size;
-    return size;
-}
-
-int xc_dom_decompress_unsafe(
-    decompress_fn fn, struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    int ret;
-
-    unsafe_dom = dom;
-    output_blob = NULL;
-    output_size = 0;
-
-    ret = fn(dom->kernel_blob, dom->kernel_size, NULL, unsafe_flush, NULL, NULL, unsafe_error);
-
-    if (ret)
-        free(output_blob);
-    else {
-        *blob = output_blob;
-        *size = output_size;
-    }
-
-    return ret;
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe.h b/tools/libs/guest/xg_dom_decompress_unsafe.h
deleted file mode 100644
index 5bc2222076..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifdef __MINIOS__
-# include "../../xen/include/xen/decompress.h"
-#else
-typedef int decompress_fn(unsigned char *inbuf, unsigned int len,
-                          int (*fill)(void*, unsigned int),
-                          int (*flush)(void*, unsigned int),
-                          unsigned char *outbuf, unsigned int *posp,
-                          void (*error)(const char *x));
-#endif
-
-#define cf_check /* No Control Flow Integriy checking */
-
-int xc_dom_decompress_unsafe(
-    decompress_fn fn, struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-
-int xc_try_bzip2_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_lz4_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_lzma_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_lzo1x_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_xz_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
-int xc_try_zstd_decode(struct xc_dom_image *dom, void **blob, size_t *size)
-    __attribute__((visibility("internal")));
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c b/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c
deleted file mode 100644
index 9d3709e6cc..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_bzip2.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-#include "../../xen/common/bunzip2.c"
-
-int xc_try_bzip2_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(bunzip2, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c b/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c
deleted file mode 100644
index 405143aa61..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lz4.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <stdint.h>
-
-#include INCLUDE_ENDIAN_H
-
-#define XG_NEED_UNALIGNED
-#include "xg_private.h"
-#include "xg_dom_decompress.h"
-
-#define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-
-#define likely(a) a
-#define unlikely(a) a
-
-static inline uint16_t le16_to_cpu(uint16_t v)
-{
-#if BYTE_ORDER == BIG_ENDIAN
-    return __builtin_bswap16(v);
-#else
-    return v;
-#endif
-}
-
-#include "../../xen/include/xen/lz4.h"
-#include "../../xen/common/decompress.h"
-#include "../../xen/common/unlz4.c"
-
-int xc_try_lz4_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unlz4, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c
deleted file mode 100644
index 5d178f0c43..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lzma.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-#include "../../xen/common/unlzma.c"
-
-int xc_try_lzma_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unlzma, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c b/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
deleted file mode 100644
index 356f228718..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_lzo1x.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include INCLUDE_ENDIAN_H
-#include <stdint.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-typedef uint8_t u8;
-typedef uint32_t u32;
-typedef uint16_t u16;
-typedef uint64_t u64;
-
-#define likely(a) a
-#define noinline
-#define unlikely(a) a
-
-static inline uint16_t be16_to_cpu(const uint16_t v)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-	return __builtin_bswap16(v);
-#else
-	return v;
-#endif
-}
-
-static inline uint32_t be32_to_cpu(const uint32_t v)
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-	return __builtin_bswap32(v);
-#else
-	return v;
-#endif
-}
-
-#include "../../xen/common/lzo.c"
-#include "../../xen/common/unlzo.c"
-
-int xc_try_lzo1x_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unlzo, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c b/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
deleted file mode 100644
index 0501f7f693..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_xz.c
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdio.h>
-#include INCLUDE_ENDIAN_H
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-// TODO
-#define XZ_DEC_X86
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint32_t __le32;
-
-static inline uint32_t cpu_to_le32(const uint32_t v)
-{
-#if BYTE_ORDER == BIG_ENDIAN
-	return __builtin_bswap32(v);
-#else
-	return v;
-#endif
-}
-
-static inline uint32_t le32_to_cpu(const uint32_t v)
-{
-#if BYTE_ORDER == BIG_ENDIAN
-	return __builtin_bswap32(v);
-#else
-	return v;
-#endif
-}
-
-#define __force
-#define always_inline
-
-#include "../../xen/common/unxz.c"
-
-int xc_try_xz_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unxz, dom, blob, size);
-}
diff --git a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
deleted file mode 100644
index 319816a390..0000000000
--- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-#include INCLUDE_ENDIAN_H
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <inttypes.h>
-
-#include "xg_private.h"
-#include "xg_dom_decompress_unsafe.h"
-
-typedef uint8_t u8;
-
-typedef uint16_t __u16;
-typedef uint32_t __u32;
-typedef uint64_t __u64;
-
-typedef uint16_t __le16;
-typedef uint32_t __le32;
-typedef uint64_t __le64;
-
-typedef uint16_t __be16;
-typedef uint32_t __be32;
-typedef uint64_t __be64;
-
-#define attr_const
-#define __force
-#define always_inline
-#define noinline
-#define __packed __attribute__((__packed__))
-
-#undef ERROR
-
-#define __TYPES_H__ /* xen/types.h guard */
-#include "../../xen/include/xen/byteorder.h"
-#include "../../xen/include/xen/unaligned.h"
-#include "../../xen/include/xen/xxhash.h"
-#include "../../xen/lib/xxhash64.c"
-#include "../../xen/common/unzstd.c"
-
-int xc_try_zstd_decode(
-    struct xc_dom_image *dom, void **blob, size_t *size)
-{
-    return xc_dom_decompress_unsafe(unzstd, dom, blob, size);
-}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:11:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:11:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429910.1652509 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0J-0002U5-EK; Wed, 23 Sep 2026 09:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429910.1652509; Wed, 23 Sep 2026 09:11:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0J-0002Tx-Bn; Wed, 23 Sep 2026 09:11:03 +0000
Received: by outflank-mailman (input) for mailman id 1429910;
 Wed, 23 Sep 2026 09:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J0I-0002Tp-Tx
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0I-00DTQc-1V
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0I-0008Pk-2P
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=t48KiYzSvOX9Zm+9LkC+NjbcQ3NQWuVmfAwpSft+dBI=; b=HkyOMSqQhF9+dx6rmbT4M80Nwc
	ldGHmDy8GJ8pj1txhlz6ttU6V8k+ZGl3C2o7rOpmcMMXdhb3mRIWCqHghWBvLPqGgRKkO6UdHccYT
	rEUPp19yXvrwqYOqWbBXZP4NZ7hWzpeQc1lIHWM8aYN/PF7uP8iwrSw9Mn4hmgdhagms=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/mm: get_page_from_l1e() is PV-or-shadow-only
Message-Id: <E1x9J0I-0008Pk-2P@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:11:02 +0000

commit a5c41f94d983637ddc3f13b08d11c3d4bb254382
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:00:00 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:00:43 2026 +0200

    x86/mm: get_page_from_l1e() is PV-or-shadow-only
    
    Otherwise the function is unreachable, violating MISRA C:2012 rule 2.1.
    With the function compiled out, its dedicated XSM hook also becomes
    unreachable, so it is similarly guarded.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/include/asm/mm.h | 7 +++++--
 xen/arch/x86/mm.c             | 4 ++++
 xen/include/xsm/dummy.h       | 2 ++
 xen/include/xsm/hooks.h       | 2 ++
 xen/xsm/flask/hooks.c         | 2 ++
 5 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h
index 2254a7e3fe..aa515efbee 100644
--- a/xen/arch/x86/include/asm/mm.h
+++ b/xen/arch/x86/include/asm/mm.h
@@ -404,10 +404,13 @@ int  get_page_type(struct page_info *page, unsigned long type);
 int  put_page_type_preemptible(struct page_info *page);
 int  get_page_type_preemptible(struct page_info *page, unsigned long type);
 int  put_old_guest_table(struct vcpu *v);
-int  get_page_from_l1e(
-    l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner);
 void put_page_from_l1e(l1_pgentry_t l1e, struct domain *l1e_owner);
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
+int get_page_from_l1e(
+    l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner);
+#endif
+
 static inline struct page_info *get_page_from_mfn(mfn_t mfn, struct domain *d)
 {
     struct page_info *page = mfn_to_page(mfn);
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index b158742408..452bbd59e3 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -795,6 +795,8 @@ bool is_memory_hole(mfn_t start, mfn_t end)
     return true;
 }
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
+
 #ifndef NDEBUG
 struct mmio_emul_range_ctxt {
     const struct domain *d;
@@ -1037,6 +1039,8 @@ get_page_from_l1e(
     return -EBUSY;
 }
 
+#endif /* CONFIG_PV || CONFIG_SHADOW_PAGING */
+
 /*
  * The following flags are used to specify behavior of various get and
  * put commands.  The first is also stored in page->partial_flags to
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 65df405dbf..6331859afa 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -701,12 +701,14 @@ static XSM_INLINE int xsm_update_va_mapping(
 
 #endif /* CONFIG_PV */
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
 static XSM_INLINE int xsm_priv_mapping(
     XSM_DEFAULT_ARG struct domain *d, struct domain *t)
 {
     XSM_ASSERT_ACTION(XSM_TARGET);
     return xsm_default_action(action, d, t);
 }
+#endif
 
 static XSM_INLINE int xsm_ioport_permission(
     XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, bool allow)
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index 87cf6e5af6..a331f5f0e5 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -141,7 +141,9 @@ XSM_HOOK(int, mmu_update, struct domain *, struct domain *, struct domain *,
 XSM_HOOK(int, mmuext_op, struct domain *, struct domain *)
 XSM_HOOK(int, update_va_mapping, struct domain *, struct domain *, l1_pgentry_t)
 #endif /* CONFIG_PV */
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
 XSM_HOOK(int, priv_mapping, struct domain *, struct domain *)
+#endif
 XSM_HOOK(int, ioport_permission, struct domain *, uint32_t, uint32_t, bool)
 XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, uint32_t, bool)
 XSM_HOOK(int, pmu_op, struct domain *, unsigned int)
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 902857415b..d65ba0aeae 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1829,10 +1829,12 @@ static int cf_check flask_update_va_mapping(
 
 #endif /* CONFIG_PV */
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
 static int cf_check flask_priv_mapping(struct domain *d, struct domain *t)
 {
     return domain_has_perm(d, t, SECCLASS_MMU, MMU__TARGET_HACK);
 }
+#endif
 
 static int cf_check flask_pmu_op(struct domain *d, unsigned int op)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:11:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:11:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429911.1652514 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0T-0002WM-Fv; Wed, 23 Sep 2026 09:11:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429911.1652514; Wed, 23 Sep 2026 09:11:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0T-0002WE-DB; Wed, 23 Sep 2026 09:11:13 +0000
Received: by outflank-mailman (input) for mailman id 1429911;
 Wed, 23 Sep 2026 09:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J0S-0002W8-U1
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:11:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0S-00DTQl-1p
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0S-0009GT-2j
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/0l1R8X5OxhZh3/ZQYZaXXIm+z6MnKyp5bEbVrXOorw=; b=uKjxxrKyBQI5mJncuO9LCwX46s
	j3ciSJe7xwtDH93EXvkeE3e19bTljUgHC8HJsKltEx5qkVlVg76IFsgMNBNeO67QyTM/AKTuwQhdG
	5ORFmTnemA129ykhRoWhUJEoOizdTyEKLW39rZ/wlhUdCEUhkRbf4LiVqHFTKvc1oy64=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] symbols: drop _{s,e}extratext
Message-Id: <E1x9J0S-0009GT-2j@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:11:12 +0000

commit b6bbf4d59a8b442652fe7ce24dfdb608866c47cb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:00:33 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:01 2026 +0200

    symbols: drop _{s,e}extratext
    
    We're only about 18.5 years late with this: See Linux commit a3b81113fb66
    ("remove support for un-needed _extratext section"), i.e. from the 2.6.25
    dev cycle.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/tools/symbols.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index fa07201771..3f2fb15836 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -52,7 +52,7 @@ struct sym_entry {
 
 static struct sym_entry *table;
 static unsigned int table_size, table_cnt;
-static unsigned long long _stext, _etext, _sinittext, _einittext, _sextratext, _eextratext;
+static unsigned long long _stext, _etext, _sinittext, _einittext;
 static int all_symbols = 0;
 static int sort_by_name = 0;
 static int map_only = 0;
@@ -148,10 +148,6 @@ static int read_symbol(FILE *in, struct sym_entry *s)
 		_sinittext = s->addr;
 	else if (strcmp(sym, "_einittext") == 0)
 		_einittext = s->addr;
-	else if (strcmp(sym, "_sextratext") == 0)
-		_sextratext = s->addr;
-	else if (strcmp(sym, "_eextratext") == 0)
-		_eextratext = s->addr;
 	else if (toupper((uint8_t)stype) == 'A')
 	{
 		/* Keep these useful absolute symbols */
@@ -210,18 +206,16 @@ static int symbol_valid(struct sym_entry *s)
 	 * and inittext sections are discarded */
 	if (!all_symbols) {
 		if ((s->addr < _stext || s->addr > _etext)
-		    && (s->addr < _sinittext || s->addr > _einittext)
-		    && (s->addr < _sextratext || s->addr > _eextratext))
+		    && (s->addr < _sinittext || s->addr > _einittext))
 			return 0;
 		/* Corner case.  Discard any symbols with the same value as
-		 * _etext _einittext or _eextratext; they can move between pass
-		 * 1 and 2 when the symbols data are added.  If these symbols
-		 * move then they may get dropped in pass 2, which breaks the
+		 * _etext or _einittext; they can move between pass 1 and 2
+		 * when the symbols data are added.  If these symbols move
+		 * then they may get dropped in pass 2, which breaks the
 		 * symbols rules.
 		 */
 		if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
-		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")) ||
-		    (s->addr == _eextratext && strcmp((char*)s->sym + offset, "_eextratext")))
+		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")))
 			return 0;
 	}
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:11:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:11:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429912.1652519 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0d-0002YT-HT; Wed, 23 Sep 2026 09:11:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429912.1652519; Wed, 23 Sep 2026 09:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0d-0002YK-EX; Wed, 23 Sep 2026 09:11:23 +0000
Received: by outflank-mailman (input) for mailman id 1429912;
 Wed, 23 Sep 2026 09:11:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J0d-0002YE-09
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:11:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0c-00DTR8-26
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0c-000A2D-32
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5ql0ZBv1SHdWjALFVFBMPUW5/NumtPAIpVR12sb29Cg=; b=2bO1aNHlLR1BDVbLYKrk5nYGSh
	zuCAKh4D2roYdFK0UU1cex7sNvMb6gQCrItThOnBZUuA82tAFKMBiLxffRNnO4GQrMf5VJW0kZc7k
	6OLz1DTbkNd4Y6c7Crxo0gvt6Npd4HPNU4Or6ajePYlo9I2yJHKOTV3qBXpnFBQmFOic=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] symbols: also special-case symbols aliasing _sinittext
Message-Id: <E1x9J0c-000A2D-32@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:11:22 +0000

commit 8b383ed0a340d0152715701284323abad70ea2fb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:01:25 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:14 2026 +0200

    symbols: also special-case symbols aliasing _sinittext
    
    A recent 4.22 randconfig build job hit a situation where (LIVEPATCH=n,
    i.e. --all-symbols not specified) both __note_gnu_build_id_end and
    _erodata aliased _sinittext on the 1st linking pass, but they didn't on
    the 2nd one. As a result two fewer symbols were emitted on the 2nd pass,
    causing $(call compare-symbol-tables, ...) to fail.
    
    Extend the existing "corner case" by also considering aliases with
    _sinittext (_stext really shouldn't have anything ahead of it), but
    discard only non-text symbols.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/tools/symbols.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index 3f2fb15836..9db1c0a20c 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -217,6 +217,11 @@ static int symbol_valid(struct sym_entry *s)
 		if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
 		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")))
 			return 0;
+		/* Same for non-text aliases of _sinittext. */
+		if (toupper(*s->sym) != 'T'
+		    && s->addr == _sinittext
+		    && strcmp((const char *)s->sym + offset, "_sinittext"))
+			return 0;
 	}
 
 	/* Exclude symbols which vary between passes. */
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:11:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:11:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429913.1652522 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0n-0002ad-IZ; Wed, 23 Sep 2026 09:11:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429913.1652522; Wed, 23 Sep 2026 09:11:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0n-0002aT-Fq; Wed, 23 Sep 2026 09:11:33 +0000
Received: by outflank-mailman (input) for mailman id 1429913;
 Wed, 23 Sep 2026 09:11:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J0n-0002aN-3O
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:11:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0m-00DTRF-2O
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0n-000As3-06
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Tzu7vJGRvWpbbIOUeshHFo8pIX1WCcXNdKSTMeFL/uI=; b=Ln9Bg9lcbzFc2QyzLCS8u2g26e
	phRtOSCY7oPpvUXH2YpnFd7KYjV7vBul6yOewF+cnq3z/UQROcszMgQDwGoPuPs7WD4B9+QHzTiK1
	ty69DdUD4ARWpMrRAOvMxLY1iHXJlFqWfv5+ICyLyLF6snQinlOrQqsr4IBMNML5ghlc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/pass-through: defer event unlock in pt_irq_create_bind()
Message-Id: <E1x9J0n-000As3-06@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:11:33 +0000

commit 62dbde7a7965f339b5aa90daeeb437f12c6b97d2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:02:29 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    x86/pass-through: defer event unlock in pt_irq_create_bind()
    
    The radix tree holding struct pirq * as obtained by pirq_get_info() is
    protected by the domain's event lock. The result ("info") and the derived
    "pirq_dpci" therefore may not be de-referenced past the dropping of that
    lock. Moving the unlock down is safe, but perhaps not obviously so:
    - vector_hashing_dest() does a memory allocation, but core event channel
      code does so too while holding the lock; the call to
      vlapic_match_dest() doesn't involve any further locking,
    - hvm_migrate_pirq() operates on the corresponding IRQ descriptor, where
      obtaining of its lock is of course fine (those locks always nest inside
      the event lock),
    - {hvm,vmx}_pi_update_irte() are very similar to hvm_migrate_pirq()
      locking-wise,
    - the locking around guest_mask_msi_irq() is the same as in the earlier
      two bullet points.
    
    As long as the PCI-devs lock is held around both
    pt_irq_{create,destroy}_bind(), this is only a latent issue.
    
    Fixes: 35a1caf8b6b5 ("pass-through: update IRTE according to guest interrupt config changes")
    Fixes: 1066331913c9 ("passthrough: don't migrate pirq when it is delivered through VT-d PI")
    Fixes: 782cf8ba4678 ("pass-through: adjust pIRQ migration")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/drivers/passthrough/x86/hvm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 32632a3b15..67486b99bd 100644
--- a/xen/drivers/passthrough/x86/hvm.c
+++ b/xen/drivers/passthrough/x86/hvm.c
@@ -371,7 +371,6 @@ int pt_irq_create_bind(
 
         dest_vcpu_id = hvm_girq_dest_2_vcpu_id(d, dest, dest_mode);
         pirq_dpci->gmsi.dest_vcpu_id = dest_vcpu_id;
-        write_unlock(&d->event_lock);
 
         pirq_dpci->gmsi.posted = false;
         vcpu = (dest_vcpu_id >= 0) ? d->vcpu[dest_vcpu_id] : NULL;
@@ -393,6 +392,7 @@ int pt_irq_create_bind(
 
             if ( rc )
             {
+                write_unlock(&d->event_lock);
                 pt_irq_destroy_bind(d, pt_irq_bind);
                 return rc;
             }
@@ -405,6 +405,7 @@ int pt_irq_create_bind(
 
             if ( !desc )
             {
+                write_unlock(&d->event_lock);
                 pt_irq_destroy_bind(d, pt_irq_bind);
                 return -EINVAL;
             }
@@ -413,6 +414,7 @@ int pt_irq_create_bind(
             spin_unlock_irqrestore(&desc->lock, flags);
         }
 
+        write_unlock(&d->event_lock);
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:11:43 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:11:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429914.1652527 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0x-0002cn-KX; Wed, 23 Sep 2026 09:11:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429914.1652527; Wed, 23 Sep 2026 09:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J0x-0002cb-HE; Wed, 23 Sep 2026 09:11:43 +0000
Received: by outflank-mailman (input) for mailman id 1429914;
 Wed, 23 Sep 2026 09:11:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J0x-0002cS-63
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:11:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0w-00DTRL-2g
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J0x-000BdL-0N
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zoyw4hpH+vXl3XccbbtlssGKrU8+WAu2tnWrKbFMRN8=; b=f9efuxSFh5l2eFQlAluTTkqVEa
	wuBzLmBr0KErArzetx3DhWnxFYwoV/facMIwKbycZph7SOp+ccaehTxD2ec0PxLhW3Y05g4auhVsX
	+CjrB7eskNlz0BQXV9H9oLICQBHcehS/SpDJIsUoChzW77CaQoZT19YIn0YbOGWRUrNo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: flush speculatively cached Bare-mode TLB entries in turn_on_mmu()
Message-Id: <E1x9J0x-000BdL-0N@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:11:43 +0000

commit d8ca89f26c8a3b00253c60cbb6f4d8eb223dfe7d
Author:     Baptiste Le Duc <baptiste.le-duc@vates.tech>
AuthorDate: Wed Sep 23 09:03:10 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    xen/riscv: flush speculatively cached Bare-mode TLB entries in turn_on_mmu()
    
    The existing SFENCE.VMA before the satp write only orders the page table
    stores from setup_initial_pagetables() against subsequent implicit reads.
    It does not prevent the CPU from speculatively caching translations after
    the fence retires.
    
    According to the RISC-V Privileged specification, implementations are
    permitted to speculatively cache Bare-mode identity mappings. Furthermore,
    selecting MODE=Bare (which happens during check_pgtbl_mode_support())
    requires zeroing the remaining fields of satp, causing ASID=0 to be
    actively used in Bare mode. Consequently, the TLB can be polluted with Bare
    identity mappings tagged with ASID=0.
    
    Once satp is written to enable Sv39 translation, these cached identity
    mappings (tagged with ASID=0) can shadow the true Sv39 translations. This
    would lead to translation failures since turn_on_mmu() jumps to a
    non-identity-mapped linker address.
    
    Fix this by adding a post-satp-write SFENCE.VMA to invalidate any stale
    translations (including Bare-mode identity mappings under ASID=0) before
    jumping to the virtual address space.
    
    Assisted-by: Claude:claude-opus-5
    Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/riscv64/head.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index 9c40512e61..7f6edc972f 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
@@ -98,6 +98,7 @@ FUNC(turn_on_mmu)
         srli    t1, t1, PAGE_SHIFT
         or      t1, t1, t0
         csrw    CSR_SATP, t1
+        sfence.vma
 
         jr      a0
 END(turn_on_mmu)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:11:53 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:11:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429915.1652531 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J17-0002ew-M8; Wed, 23 Sep 2026 09:11:53 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429915.1652531; Wed, 23 Sep 2026 09:11:53 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J17-0002en-IZ; Wed, 23 Sep 2026 09:11:53 +0000
Received: by outflank-mailman (input) for mailman id 1429915;
 Wed, 23 Sep 2026 09:11:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J17-0002ef-9D
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:11:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J16-00DTRP-30
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J17-000CT5-0f
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:11:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=fS3tdWV4oQ+VifqfVvtdLoJXprCNfZYpoYe9ZTNBXOw=; b=Ja3zUOjhzOjR1uas9xN5xdhE1/
	iMUMDgwNwREf7Z2gm60e9zMolyWXgyDS9CDXIrCd5EVSWvEeBRRIbltZuk04sfuAv0tdq9mX+64mi
	xEJm+uPWqYnZKSagPCBb5wPWxgzF9yrgKaXYjBbLfub9NHlfbO7RnJZRFc734OugY8d4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen/riscv: fix level_map_mask truncation on load_start
Message-Id: <E1x9J17-000CT5-0f@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:11:53 +0000

commit 08a898b93d214a38965fbc4cd9b7a36e5c715691
Author:     Baptiste Le Duc <baptiste.le-duc@vates.tech>
AuthorDate: Wed Sep 23 09:04:16 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    xen/riscv: fix level_map_mask truncation on load_start
    
    check_pgtbl_mode_support() declares level_map_mask as bare `unsigned`, i.e.
    a 32-bit type while it derives from a paddr_t which is in both RV32/RV64 a
    64-bit type. Storing that value into a 32-bit local silently drops any set
    bits above bit 31.
    
    The mask is then used as:
    
        aligned_load_start = load_start & level_map_mask;
    
    load_start is `unsigned long` (64-bit on riscv64) and if it requires more
    than 32 bits to represent, because load_start zero-extend to 64 bits, we
    would drop some load_start's bits during the AND.
    
    Widen level_map_mask to `unsigned long`, matching the width of the physical
    address.
    
    Fixes: e66003e7be19 ("xen/riscv: introduce setup_initial_pages")
    Reported-by: Zheng Zhang <zhangzheng@iscas.ac.cn>
    Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Tested-by: Zheng Zhang <zhangzheng@iscas.ac.cn>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c
index 4d3b8c2204..610d111945 100644
--- a/xen/arch/riscv/mm.c
+++ b/xen/arch/riscv/mm.c
@@ -181,7 +181,7 @@ static bool __init check_pgtbl_mode_support(struct mmu_desc *mmu_desc,
     bool is_mode_supported = false;
     unsigned int index;
     unsigned int page_table_level = (mmu_desc->num_levels - 1);
-    unsigned level_map_mask = XEN_PT_LEVEL_MAP_MASK(page_table_level);
+    unsigned long level_map_mask = XEN_PT_LEVEL_MAP_MASK(page_table_level);
 
     unsigned long aligned_load_start = load_start & level_map_mask;
     unsigned long aligned_page_size = XEN_PT_LEVEL_SIZE(page_table_level);
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:12:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:12:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429916.1652534 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1I-0002h1-Mw; Wed, 23 Sep 2026 09:12:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429916.1652534; Wed, 23 Sep 2026 09:12:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1I-0002gt-Jx; Wed, 23 Sep 2026 09:12:04 +0000
Received: by outflank-mailman (input) for mailman id 1429916;
 Wed, 23 Sep 2026 09:12:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J1H-0002gh-C8
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:12:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1H-00DTRg-04
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1H-000DPy-10
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Axx+y5OpGNHFNp/1n03KHJOCRCD/GI7OTwSNAZft9FY=; b=SY/hnqC1A/hRh6IIiCTVIxtcQL
	JcvwjWxhjDsh5i+RgSAu5WyPv0vit9QXCLxTjVl+bH7RDEzMqcfYeYEdpg9MnAVX+rPbPux87N/Du
	1bw3esL9/rgGzfiWnTah1hLHLjgK/a8CqwiiLc4Z3deFKEPlmU8xYvCcf7HTbNk9yZtc=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] ACPI: prune undue ia64 leftover
Message-Id: <E1x9J1H-000DPy-10@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:12:03 +0000

commit a229e8a50f9d7b7840667a8a9e2b7ae038ca53ee
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:04:41 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    ACPI: prune undue ia64 leftover
    
    This undoes the part of 3b0246ea0347 ("Fix ia64 tools build") which was
    missed by e567964a54b8 ("tools: drop ia64 support").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/include/acpi/platform/acenv.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/include/acpi/platform/acenv.h b/xen/include/acpi/platform/acenv.h
index 83cdb77d75..61adcff8a2 100644
--- a/xen/include/acpi/platform/acenv.h
+++ b/xen/include/acpi/platform/acenv.h
@@ -136,9 +136,7 @@
 
 /*! [Begin] no source code translation */
 
-#if defined(__XEN_TOOLS__) && defined(__ia64__)
-#include "ac_ia64_tools.h"
-#elif 1 /*defined(_LINUX) || defined(__linux__)*/
+#if 1 /*defined(_LINUX) || defined(__linux__)*/
 #include "aclinux.h"
 
 #elif defined(_AED_EFI)
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:12:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:12:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429917.1652539 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1S-0002jt-Pq; Wed, 23 Sep 2026 09:12:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429917.1652539; Wed, 23 Sep 2026 09:12:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1S-0002jl-Mj; Wed, 23 Sep 2026 09:12:14 +0000
Received: by outflank-mailman (input) for mailman id 1429917;
 Wed, 23 Sep 2026 09:12:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J1R-0002jb-Eu
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:12:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1R-00DTRo-0L
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1R-000E86-1H
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=le9fE6QbYkjraeFMC5/rRF4Ps9NFW/8xspIlqK7N/EI=; b=c5pgAmXPe7tvjoRKPyPSyaAdZk
	XaCQB11cAVIwAti/RW04Y6cuQGIu+2zZfCkDdCtaj+hY8ZjYhRdn9zXIufQoRXopLpIlseL1FPRhA
	pHjHP11by/e7g22M7yh/OtMY1cHVl/7F5y1Kj/HYE3A6L5yBuMFZ86Ynnx9vlHmGLPqs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] CHANGELOG: add removal of grub-pv
Message-Id: <E1x9J1R-000E86-1H@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:12:13 +0000

commit 5ed278157bfdb5cbddb5da56faf6ac5bdc46fe0d
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Wed Sep 23 09:05:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    CHANGELOG: add removal of grub-pv
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 CHANGELOG.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa1a777dd4..a2dd01037b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
      The only known user was the classic-xen fork of Linux.  This does not
      affect Xen kexec support in the kexec-tools package.
    - The example stubdom "c-stubdom" has been removed.
+   - The grub-pv stubdom has been removed.  A grub-pv stubdom from an older
+     Xen version (e.g. 4.22) will still work with Xen 4.23.
 
 ## [4.22.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2026-07-30
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:12:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:12:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429918.1652542 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1c-0002m3-Qp; Wed, 23 Sep 2026 09:12:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429918.1652542; Wed, 23 Sep 2026 09:12:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1c-0002ls-O7; Wed, 23 Sep 2026 09:12:24 +0000
Received: by outflank-mailman (input) for mailman id 1429918;
 Wed, 23 Sep 2026 09:12:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J1b-0002ll-HX
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:12:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1b-00DTSA-0c
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1b-000ErV-1Z
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=sT1GHWmpvr1ZFXnVZzbKiIJ0JzNivaJJiE3lYfmEaBU=; b=AAXa3R4wHum5ui0PybAMz+bD/s
	LX7jvhJi2UIysCtErfACtt5+Vy7s20OEsgHglzCRrJ6CZBlwRaApqW6uhkL/AtDRFfRiw+oNAwdeE
	oqZ75xeOcqFaYb6htL1Z7Dda8A1Jy3HFbgk8hIXpup4RDN9GIFJniSBwoHlPyOmKOQBU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again
Message-Id: <E1x9J1b-000ErV-1Z@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:12:23 +0000

commit e35ef4439b69de9ebbda355ec74a25e0487c52a7
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:05:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again
    
    Both arm<NN>/head.S and arm<NN>/mmu/head.S have a local symbol "fail".
    Without a .file directive locals will be associated with the path-less
    object filename (head.o). Hence the two symbol names collide. Add .file,
    also in arm<NN>/mpu/head.S for consistency.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/Makefile         | 3 ---
 xen/arch/arm/arm32/head.S     | 2 ++
 xen/arch/arm/arm32/mmu/head.S | 2 ++
 xen/arch/arm/arm32/mpu/head.S | 2 ++
 xen/arch/arm/arm64/head.S     | 2 ++
 xen/arch/arm/arm64/mmu/head.S | 2 ++
 xen/arch/arm/arm64/mpu/head.S | 2 ++
 7 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index e9b003610b..eeb0efdb7e 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -91,9 +91,6 @@ include scripts/Makefile.link
 # Suppress orphan section checking for the time being.
 orphan-handling-y :=
 
-# Downgrade duplicate symbol errors to warnings for the time being.
-syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --warn-dup
-
 .PHONY: include
 include:
 
diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 63453dd3a3..7d68e69c5e 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -17,6 +17,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm32/mmu/head.S b/xen/arch/arm/arm32/mmu/head.S
index 3731322f7e..0999181de4 100644
--- a/xen/arch/arm/arm32/mmu/head.S
+++ b/xen/arch/arm/arm32/mmu/head.S
@@ -5,6 +5,8 @@
  * Arm32 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm32/mpu/head.S b/xen/arch/arm/arm32/mpu/head.S
index 6a631626a7..3f5c404c4d 100644
--- a/xen/arch/arm/arm32/mpu/head.S
+++ b/xen/arch/arm/arm32/mpu/head.S
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R-AArch32 MPU system.
  */
 
+    .file __FILE__
+
 #include <asm/arm32/macros.h>
 #include <asm/arm32/sysregs.h>
 #include <asm/cpregs.h>
diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 72c7b24498..7d1e205353 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -20,6 +20,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm64/mmu/head.S b/xen/arch/arm/arm64/mmu/head.S
index 8e514d2114..aabbd4f421 100644
--- a/xen/arch/arm/arm64/mmu/head.S
+++ b/xen/arch/arm/arm64/mmu/head.S
@@ -5,6 +5,8 @@
  * Arm64 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S
index 5df0af571e..960d20a841 100644
--- a/xen/arch/arm/arm64/mpu/head.S
+++ b/xen/arch/arm/arm64/mpu/head.S
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R MPU system.
  */
 
+    .file __FILE__
+
 #include <asm/mpu/regions.inc>
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 09:12:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 09:12:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1429919.1652546 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1m-0002oJ-S3; Wed, 23 Sep 2026 09:12:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1429919.1652546; Wed, 23 Sep 2026 09:12:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9J1m-0002oB-PQ; Wed, 23 Sep 2026 09:12:34 +0000
Received: by outflank-mailman (input) for mailman id 1429919;
 Wed, 23 Sep 2026 09:12:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9J1l-0002o2-KH
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 09:12:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1l-00DTSL-0t
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9J1l-000FgX-1q
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 09:12:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=v6bpcnGAwN58PX0c2jwo4e6a0d+Fp0CBCE1zKsMkvzI=; b=5a7BVSrZukuyCxBB4G4ZJQdgL2
	Xu+xLR/lx3uWeWtIVsGAi7NdoIwMPB27a4XOYSVMtW0tUwrTeDMhpeKzg1VIFabpT0r2c7iJkjgUf
	HO7XJaeqxPq9XAAb44eyv+dqlW+bk7chenIYNgSOKi9kdOcWZgBIfeo9ioCT7dfJeusk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] automation/Eclair: tag directive 4.3 as well as rules 17.2 and 21.17 as clean
Message-Id: <E1x9J1l-000FgX-1q@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 09:12:33 +0000

commit f6ccb8effe4b749b14df2f5b5763a87e7a47cc1a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:06:32 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    automation/Eclair: tag directive 4.3 as well as rules 17.2 and 21.17 as clean
    
    These have been clean for a while already, without being marked so.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 automation/eclair_analysis/ECLAIR/tagging.ecl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/eclair_analysis/ECLAIR/tagging.ecl
index eeccb57426..3f3a00c8cb 100644
--- a/automation/eclair_analysis/ECLAIR/tagging.ecl
+++ b/automation/eclair_analysis/ECLAIR/tagging.ecl
@@ -23,6 +23,7 @@
 "MC3A2.D1.1||
 MC3A2.D2.1||
 MC3A2.D4.1||
+MC3A2.D4.3||
 MC3A2.D4.7||
 MC3A2.D4.10||
 MC3A2.D4.11||
@@ -77,6 +78,7 @@ MC3A2.R16.3||
 MC3A2.R16.6||
 MC3A2.R16.7||
 MC3A2.R17.1||
+MC3A2.R17.2||
 MC3A2.R17.3||
 MC3A2.R17.4||
 MC3A2.R17.5||
@@ -105,6 +107,7 @@ MC3A2.R21.10||
 MC3A2.R21.11||
 MC3A2.R21.12||
 MC3A2.R21.13||
+MC3A2.R21.17||
 MC3A2.R21.18||
 MC3A2.R21.19||
 MC3A2.R21.20||
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:33:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:33:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430143.1652716 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KHg-00060l-0l; Wed, 23 Sep 2026 10:33:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430143.1652716; Wed, 23 Sep 2026 10:33:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KHf-00060d-UT; Wed, 23 Sep 2026 10:33:03 +0000
Received: by outflank-mailman (input) for mailman id 1430143;
 Wed, 23 Sep 2026 10:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KHe-00060X-Rp
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KHe-00DV56-0X
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KHe-0077jQ-1S
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=HtlxuLkQ3j5u9yoHyaQeEs8sbHDz4vwL3TGyppBdoyo=; b=hiS+tnSTL6ZX7wNivukVRkCgqT
	wF6EWt07hRq1DUCixe0BhFAMSyhvfVKLhg2SOdmDIUlZgHagszFW3JsOHwNZ3fU4klPtu3/tzS3Ck
	lqCIOgyDY6CvQiqG1vLzMFnuVwgvtTspz5poUFkcanRAn6bdPHYuH1HoecU1XX/bMLi4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/mm: get_page_from_l1e() is PV-or-shadow-only
Message-Id: <E1x9KHe-0077jQ-1S@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:33:02 +0000

commit a5c41f94d983637ddc3f13b08d11c3d4bb254382
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:00:00 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:00:43 2026 +0200

    x86/mm: get_page_from_l1e() is PV-or-shadow-only
    
    Otherwise the function is unreachable, violating MISRA C:2012 rule 2.1.
    With the function compiled out, its dedicated XSM hook also becomes
    unreachable, so it is similarly guarded.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/include/asm/mm.h | 7 +++++--
 xen/arch/x86/mm.c             | 4 ++++
 xen/include/xsm/dummy.h       | 2 ++
 xen/include/xsm/hooks.h       | 2 ++
 xen/xsm/flask/hooks.c         | 2 ++
 5 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h
index 2254a7e3fe..aa515efbee 100644
--- a/xen/arch/x86/include/asm/mm.h
+++ b/xen/arch/x86/include/asm/mm.h
@@ -404,10 +404,13 @@ int  get_page_type(struct page_info *page, unsigned long type);
 int  put_page_type_preemptible(struct page_info *page);
 int  get_page_type_preemptible(struct page_info *page, unsigned long type);
 int  put_old_guest_table(struct vcpu *v);
-int  get_page_from_l1e(
-    l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner);
 void put_page_from_l1e(l1_pgentry_t l1e, struct domain *l1e_owner);
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
+int get_page_from_l1e(
+    l1_pgentry_t l1e, struct domain *l1e_owner, struct domain *pg_owner);
+#endif
+
 static inline struct page_info *get_page_from_mfn(mfn_t mfn, struct domain *d)
 {
     struct page_info *page = mfn_to_page(mfn);
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index b158742408..452bbd59e3 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -795,6 +795,8 @@ bool is_memory_hole(mfn_t start, mfn_t end)
     return true;
 }
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
+
 #ifndef NDEBUG
 struct mmio_emul_range_ctxt {
     const struct domain *d;
@@ -1037,6 +1039,8 @@ get_page_from_l1e(
     return -EBUSY;
 }
 
+#endif /* CONFIG_PV || CONFIG_SHADOW_PAGING */
+
 /*
  * The following flags are used to specify behavior of various get and
  * put commands.  The first is also stored in page->partial_flags to
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index 65df405dbf..6331859afa 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -701,12 +701,14 @@ static XSM_INLINE int xsm_update_va_mapping(
 
 #endif /* CONFIG_PV */
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
 static XSM_INLINE int xsm_priv_mapping(
     XSM_DEFAULT_ARG struct domain *d, struct domain *t)
 {
     XSM_ASSERT_ACTION(XSM_TARGET);
     return xsm_default_action(action, d, t);
 }
+#endif
 
 static XSM_INLINE int xsm_ioport_permission(
     XSM_DEFAULT_ARG struct domain *d, uint32_t s, uint32_t e, bool allow)
diff --git a/xen/include/xsm/hooks.h b/xen/include/xsm/hooks.h
index 87cf6e5af6..a331f5f0e5 100644
--- a/xen/include/xsm/hooks.h
+++ b/xen/include/xsm/hooks.h
@@ -141,7 +141,9 @@ XSM_HOOK(int, mmu_update, struct domain *, struct domain *, struct domain *,
 XSM_HOOK(int, mmuext_op, struct domain *, struct domain *)
 XSM_HOOK(int, update_va_mapping, struct domain *, struct domain *, l1_pgentry_t)
 #endif /* CONFIG_PV */
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
 XSM_HOOK(int, priv_mapping, struct domain *, struct domain *)
+#endif
 XSM_HOOK(int, ioport_permission, struct domain *, uint32_t, uint32_t, bool)
 XSM_HOOK(int, ioport_mapping, struct domain *, uint32_t, uint32_t, bool)
 XSM_HOOK(int, pmu_op, struct domain *, unsigned int)
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 902857415b..d65ba0aeae 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1829,10 +1829,12 @@ static int cf_check flask_update_va_mapping(
 
 #endif /* CONFIG_PV */
 
+#if defined(CONFIG_PV) || defined(CONFIG_SHADOW_PAGING)
 static int cf_check flask_priv_mapping(struct domain *d, struct domain *t)
 {
     return domain_has_perm(d, t, SECCLASS_MMU, MMU__TARGET_HACK);
 }
+#endif
 
 static int cf_check flask_pmu_op(struct domain *d, unsigned int op)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:33:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:33:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430144.1652720 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KHq-00062W-2E; Wed, 23 Sep 2026 10:33:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430144.1652720; Wed, 23 Sep 2026 10:33:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KHp-00062O-Vn; Wed, 23 Sep 2026 10:33:13 +0000
Received: by outflank-mailman (input) for mailman id 1430144;
 Wed, 23 Sep 2026 10:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KHo-00062F-KG
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KHo-00DV5C-0q
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KHo-0078sj-1l
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=uYKj7fudak9IkQfIcVgIlHEtzDo/8fzTMBFm4s7qrzs=; b=0FZeVsAMoYvwG2rOY6d2I/zTl3
	HixbxgAd+VZK0WVYNWyt7oD9dPLmajFq1eNnBQVjvj+nEFcUt6M7MMBh0qlrWNMt4NV5HWse2O94p
	O1We+3CV4kKwb4A3raGbCpYTRoGVEaPW5GGGxFn0LQSjVEBnhnDloINFSPLAjJr/DRCs=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] symbols: drop _{s,e}extratext
Message-Id: <E1x9KHo-0078sj-1l@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:33:12 +0000

commit b6bbf4d59a8b442652fe7ce24dfdb608866c47cb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:00:33 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:01 2026 +0200

    symbols: drop _{s,e}extratext
    
    We're only about 18.5 years late with this: See Linux commit a3b81113fb66
    ("remove support for un-needed _extratext section"), i.e. from the 2.6.25
    dev cycle.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/tools/symbols.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index fa07201771..3f2fb15836 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -52,7 +52,7 @@ struct sym_entry {
 
 static struct sym_entry *table;
 static unsigned int table_size, table_cnt;
-static unsigned long long _stext, _etext, _sinittext, _einittext, _sextratext, _eextratext;
+static unsigned long long _stext, _etext, _sinittext, _einittext;
 static int all_symbols = 0;
 static int sort_by_name = 0;
 static int map_only = 0;
@@ -148,10 +148,6 @@ static int read_symbol(FILE *in, struct sym_entry *s)
 		_sinittext = s->addr;
 	else if (strcmp(sym, "_einittext") == 0)
 		_einittext = s->addr;
-	else if (strcmp(sym, "_sextratext") == 0)
-		_sextratext = s->addr;
-	else if (strcmp(sym, "_eextratext") == 0)
-		_eextratext = s->addr;
 	else if (toupper((uint8_t)stype) == 'A')
 	{
 		/* Keep these useful absolute symbols */
@@ -210,18 +206,16 @@ static int symbol_valid(struct sym_entry *s)
 	 * and inittext sections are discarded */
 	if (!all_symbols) {
 		if ((s->addr < _stext || s->addr > _etext)
-		    && (s->addr < _sinittext || s->addr > _einittext)
-		    && (s->addr < _sextratext || s->addr > _eextratext))
+		    && (s->addr < _sinittext || s->addr > _einittext))
 			return 0;
 		/* Corner case.  Discard any symbols with the same value as
-		 * _etext _einittext or _eextratext; they can move between pass
-		 * 1 and 2 when the symbols data are added.  If these symbols
-		 * move then they may get dropped in pass 2, which breaks the
+		 * _etext or _einittext; they can move between pass 1 and 2
+		 * when the symbols data are added.  If these symbols move
+		 * then they may get dropped in pass 2, which breaks the
 		 * symbols rules.
 		 */
 		if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
-		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")) ||
-		    (s->addr == _eextratext && strcmp((char*)s->sym + offset, "_eextratext")))
+		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")))
 			return 0;
 	}
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:33:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:33:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430146.1652724 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KI0-00064X-3f; Wed, 23 Sep 2026 10:33:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430146.1652724; Wed, 23 Sep 2026 10:33:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KI0-00064P-0u; Wed, 23 Sep 2026 10:33:24 +0000
Received: by outflank-mailman (input) for mailman id 1430146;
 Wed, 23 Sep 2026 10:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KHy-00064J-Mo
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KHy-00DV5c-18
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KHy-0079sX-23
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=iFQJgB5oWnuywOHmyMA1TAnzGFagD/5es9mWYjmHMno=; b=lpfJ1zf1atmVWHNVcg1v/n1vSM
	RGO5Ugp5BR9/rHx1iqlRVNPAe6STn40G9TtvOMR1KP52FMl3hOBHor81i8YqOSq+VFR5vJEmqcGuU
	m6g5aJcRI74y21O/z6HrDo1r9jjthDavuCsOAK+unNlqifpmdhyaK3F85yOzbjwLguSY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] symbols: also special-case symbols aliasing _sinittext
Message-Id: <E1x9KHy-0079sX-23@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:33:22 +0000

commit 8b383ed0a340d0152715701284323abad70ea2fb
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:01:25 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:14 2026 +0200

    symbols: also special-case symbols aliasing _sinittext
    
    A recent 4.22 randconfig build job hit a situation where (LIVEPATCH=n,
    i.e. --all-symbols not specified) both __note_gnu_build_id_end and
    _erodata aliased _sinittext on the 1st linking pass, but they didn't on
    the 2nd one. As a result two fewer symbols were emitted on the 2nd pass,
    causing $(call compare-symbol-tables, ...) to fail.
    
    Extend the existing "corner case" by also considering aliases with
    _sinittext (_stext really shouldn't have anything ahead of it), but
    discard only non-text symbols.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/tools/symbols.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index 3f2fb15836..9db1c0a20c 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -217,6 +217,11 @@ static int symbol_valid(struct sym_entry *s)
 		if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
 		    (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")))
 			return 0;
+		/* Same for non-text aliases of _sinittext. */
+		if (toupper(*s->sym) != 'T'
+		    && s->addr == _sinittext
+		    && strcmp((const char *)s->sym + offset, "_sinittext"))
+			return 0;
 	}
 
 	/* Exclude symbols which vary between passes. */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:33:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:33:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430147.1652728 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIA-00066X-4r; Wed, 23 Sep 2026 10:33:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430147.1652728; Wed, 23 Sep 2026 10:33:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIA-00066Q-2B; Wed, 23 Sep 2026 10:33:34 +0000
Received: by outflank-mailman (input) for mailman id 1430147;
 Wed, 23 Sep 2026 10:33:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KI8-00066I-Ph
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:33:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KI8-00DV5h-1Q
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KI8-007As1-2L
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=0lAkaTJnELoMASuHC3QvQv4MBFb0Ub1njEvE5owCcRw=; b=FbTH3Y+wPfSg2QPm65Urow4xZY
	xTKm6QW9XS8FKrIbf2V8mr4VZWYKc+nsafwX5+sCi23jpTGF7jJPtCTre7e25kRdcGgaU3nIf66rx
	JXtW7TmK31K7BagTGg00j6TCMHT+IvV+9yHmvaMkAK65EtZJhYW6WvxGj8AEPh6Ewtwk=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/pass-through: defer event unlock in pt_irq_create_bind()
Message-Id: <E1x9KI8-007As1-2L@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:33:32 +0000

commit 62dbde7a7965f339b5aa90daeeb437f12c6b97d2
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:02:29 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    x86/pass-through: defer event unlock in pt_irq_create_bind()
    
    The radix tree holding struct pirq * as obtained by pirq_get_info() is
    protected by the domain's event lock. The result ("info") and the derived
    "pirq_dpci" therefore may not be de-referenced past the dropping of that
    lock. Moving the unlock down is safe, but perhaps not obviously so:
    - vector_hashing_dest() does a memory allocation, but core event channel
      code does so too while holding the lock; the call to
      vlapic_match_dest() doesn't involve any further locking,
    - hvm_migrate_pirq() operates on the corresponding IRQ descriptor, where
      obtaining of its lock is of course fine (those locks always nest inside
      the event lock),
    - {hvm,vmx}_pi_update_irte() are very similar to hvm_migrate_pirq()
      locking-wise,
    - the locking around guest_mask_msi_irq() is the same as in the earlier
      two bullet points.
    
    As long as the PCI-devs lock is held around both
    pt_irq_{create,destroy}_bind(), this is only a latent issue.
    
    Fixes: 35a1caf8b6b5 ("pass-through: update IRTE according to guest interrupt config changes")
    Fixes: 1066331913c9 ("passthrough: don't migrate pirq when it is delivered through VT-d PI")
    Fixes: 782cf8ba4678 ("pass-through: adjust pIRQ migration")
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 xen/drivers/passthrough/x86/hvm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c
index 32632a3b15..67486b99bd 100644
--- a/xen/drivers/passthrough/x86/hvm.c
+++ b/xen/drivers/passthrough/x86/hvm.c
@@ -371,7 +371,6 @@ int pt_irq_create_bind(
 
         dest_vcpu_id = hvm_girq_dest_2_vcpu_id(d, dest, dest_mode);
         pirq_dpci->gmsi.dest_vcpu_id = dest_vcpu_id;
-        write_unlock(&d->event_lock);
 
         pirq_dpci->gmsi.posted = false;
         vcpu = (dest_vcpu_id >= 0) ? d->vcpu[dest_vcpu_id] : NULL;
@@ -393,6 +392,7 @@ int pt_irq_create_bind(
 
             if ( rc )
             {
+                write_unlock(&d->event_lock);
                 pt_irq_destroy_bind(d, pt_irq_bind);
                 return rc;
             }
@@ -405,6 +405,7 @@ int pt_irq_create_bind(
 
             if ( !desc )
             {
+                write_unlock(&d->event_lock);
                 pt_irq_destroy_bind(d, pt_irq_bind);
                 return -EINVAL;
             }
@@ -413,6 +414,7 @@ int pt_irq_create_bind(
             spin_unlock_irqrestore(&desc->lock, flags);
         }
 
+        write_unlock(&d->event_lock);
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:33:54 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:33:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430148.1652732 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIK-000694-8O; Wed, 23 Sep 2026 10:33:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430148.1652732; Wed, 23 Sep 2026 10:33:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIK-00068u-55; Wed, 23 Sep 2026 10:33:44 +0000
Received: by outflank-mailman (input) for mailman id 1430148;
 Wed, 23 Sep 2026 10:33:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KII-00068o-SX
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:33:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KII-00DV5o-1i
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KII-007Brs-2d
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=IQuy2qYSGUy5a6Xeh63yTCOE5e7CIXB/JqsTMKfP9kk=; b=Y6HrwpuEolIu8n4Y9lLDqJ3pYq
	PXi3yJRb3gce3jadmh9sWM6EQknxzAvnZnxEc58HmOX3JT3EfSXKqKUz5TikF9tda2zvGUEvR3eOz
	4cKA41uFGCsJVbx7Gx9RTfdU7eQD9ExYUlRr7dov3T+IVJ1CpcWLjmeuz1u8YvpPiFXw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: flush speculatively cached Bare-mode TLB entries in turn_on_mmu()
Message-Id: <E1x9KII-007Brs-2d@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:33:42 +0000

commit d8ca89f26c8a3b00253c60cbb6f4d8eb223dfe7d
Author:     Baptiste Le Duc <baptiste.le-duc@vates.tech>
AuthorDate: Wed Sep 23 09:03:10 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    xen/riscv: flush speculatively cached Bare-mode TLB entries in turn_on_mmu()
    
    The existing SFENCE.VMA before the satp write only orders the page table
    stores from setup_initial_pagetables() against subsequent implicit reads.
    It does not prevent the CPU from speculatively caching translations after
    the fence retires.
    
    According to the RISC-V Privileged specification, implementations are
    permitted to speculatively cache Bare-mode identity mappings. Furthermore,
    selecting MODE=Bare (which happens during check_pgtbl_mode_support())
    requires zeroing the remaining fields of satp, causing ASID=0 to be
    actively used in Bare mode. Consequently, the TLB can be polluted with Bare
    identity mappings tagged with ASID=0.
    
    Once satp is written to enable Sv39 translation, these cached identity
    mappings (tagged with ASID=0) can shadow the true Sv39 translations. This
    would lead to translation failures since turn_on_mmu() jumps to a
    non-identity-mapped linker address.
    
    Fix this by adding a post-satp-write SFENCE.VMA to invalidate any stale
    translations (including Bare-mode identity mappings under ASID=0) before
    jumping to the virtual address space.
    
    Assisted-by: Claude:claude-opus-5
    Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/riscv64/head.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index 9c40512e61..7f6edc972f 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
@@ -98,6 +98,7 @@ FUNC(turn_on_mmu)
         srli    t1, t1, PAGE_SHIFT
         or      t1, t1, t0
         csrw    CSR_SATP, t1
+        sfence.vma
 
         jr      a0
 END(turn_on_mmu)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:34:04 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:34:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430149.1652735 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIU-0006Az-9H; Wed, 23 Sep 2026 10:33:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430149.1652735; Wed, 23 Sep 2026 10:33:54 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIU-0006Ar-6c; Wed, 23 Sep 2026 10:33:54 +0000
Received: by outflank-mailman (input) for mailman id 1430149;
 Wed, 23 Sep 2026 10:33:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KIS-0006Aj-VJ
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:33:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIS-00DV5s-1z
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIS-007CwK-2v
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:33:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=I68TEkZU4pZz5HN65XMaJSAUjziUGo2RazUWc5m/Xx0=; b=qeEC0mwy7mef6hmEbnaogawidK
	MLTt0sf3h3TCKO7WSX//FpJlftTn4OtWcm1EpQfjbbod2EjOOC7o4z9XBbHFnnSQrH8HbmVORVK65
	akd56yZ56+UbUWs3/qbpmmkU0BPkmfLL24DRqfaUCw6KlApArq5/oM84O/dj5tlZryo0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: fix level_map_mask truncation on load_start
Message-Id: <E1x9KIS-007CwK-2v@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:33:52 +0000

commit 08a898b93d214a38965fbc4cd9b7a36e5c715691
Author:     Baptiste Le Duc <baptiste.le-duc@vates.tech>
AuthorDate: Wed Sep 23 09:04:16 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    xen/riscv: fix level_map_mask truncation on load_start
    
    check_pgtbl_mode_support() declares level_map_mask as bare `unsigned`, i.e.
    a 32-bit type while it derives from a paddr_t which is in both RV32/RV64 a
    64-bit type. Storing that value into a 32-bit local silently drops any set
    bits above bit 31.
    
    The mask is then used as:
    
        aligned_load_start = load_start & level_map_mask;
    
    load_start is `unsigned long` (64-bit on riscv64) and if it requires more
    than 32 bits to represent, because load_start zero-extend to 64 bits, we
    would drop some load_start's bits during the AND.
    
    Widen level_map_mask to `unsigned long`, matching the width of the physical
    address.
    
    Fixes: e66003e7be19 ("xen/riscv: introduce setup_initial_pages")
    Reported-by: Zheng Zhang <zhangzheng@iscas.ac.cn>
    Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
    Tested-by: Zheng Zhang <zhangzheng@iscas.ac.cn>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 xen/arch/riscv/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c
index 4d3b8c2204..610d111945 100644
--- a/xen/arch/riscv/mm.c
+++ b/xen/arch/riscv/mm.c
@@ -181,7 +181,7 @@ static bool __init check_pgtbl_mode_support(struct mmu_desc *mmu_desc,
     bool is_mode_supported = false;
     unsigned int index;
     unsigned int page_table_level = (mmu_desc->num_levels - 1);
-    unsigned level_map_mask = XEN_PT_LEVEL_MAP_MASK(page_table_level);
+    unsigned long level_map_mask = XEN_PT_LEVEL_MAP_MASK(page_table_level);
 
     unsigned long aligned_load_start = load_start & level_map_mask;
     unsigned long aligned_page_size = XEN_PT_LEVEL_SIZE(page_table_level);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:34:14 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:34:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430150.1652740 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIe-0006Cs-Ad; Wed, 23 Sep 2026 10:34:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430150.1652740; Wed, 23 Sep 2026 10:34:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIe-0006Ck-7z; Wed, 23 Sep 2026 10:34:04 +0000
Received: by outflank-mailman (input) for mailman id 1430150;
 Wed, 23 Sep 2026 10:34:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KId-0006Ce-1e
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:34:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIc-00DV67-2F
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIc-007DwC-3D
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=p4PZZ0kRxQ/P5/JY+In0IDpvvp2/JJR6THoET3p3TMw=; b=Lj7krCzIUZr4DW/ntPVBFAUW2Z
	yw1RwjftN++V4lMP3tMiFsr2Tgs63cVMRurR+NeiaifFeQ1XUjTA8ThCXBRD5RgbpI3PzKMTS++7+
	MV97hQZJNQB7P6Csdn0CMrv1mSL597M9sEoZmao4LdwEi3QW3GfG8bfHXh5iBZHyXIXg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] ACPI: prune undue ia64 leftover
Message-Id: <E1x9KIc-007DwC-3D@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:34:02 +0000

commit a229e8a50f9d7b7840667a8a9e2b7ae038ca53ee
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:04:41 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    ACPI: prune undue ia64 leftover
    
    This undoes the part of 3b0246ea0347 ("Fix ia64 tools build") which was
    missed by e567964a54b8 ("tools: drop ia64 support").
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/include/acpi/platform/acenv.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/include/acpi/platform/acenv.h b/xen/include/acpi/platform/acenv.h
index 83cdb77d75..61adcff8a2 100644
--- a/xen/include/acpi/platform/acenv.h
+++ b/xen/include/acpi/platform/acenv.h
@@ -136,9 +136,7 @@
 
 /*! [Begin] no source code translation */
 
-#if defined(__XEN_TOOLS__) && defined(__ia64__)
-#include "ac_ia64_tools.h"
-#elif 1 /*defined(_LINUX) || defined(__linux__)*/
+#if 1 /*defined(_LINUX) || defined(__linux__)*/
 #include "aclinux.h"
 
 #elif defined(_AED_EFI)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:34:24 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:34:24 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430151.1652744 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIo-0006F6-CL; Wed, 23 Sep 2026 10:34:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430151.1652744; Wed, 23 Sep 2026 10:34:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIo-0006Ey-9O; Wed, 23 Sep 2026 10:34:14 +0000
Received: by outflank-mailman (input) for mailman id 1430151;
 Wed, 23 Sep 2026 10:34:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KIn-0006Eq-4K
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:34:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIm-00DV6D-2W
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:13 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIn-007EqM-0F
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:13 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ZMl8lTnYkM4x0hWJ78WGIa/0xrRv+tXGrV5fo8DypBI=; b=XEhVZf14Fhc+Jn1cmps59JiphC
	iwRpxATIVE2qPU6zAWl6JF9US8nFXS35yTKuKkpyPckcWY3wkODpCmF83k6tDruqEtWVJnKZt8jG3
	5Z7vMVuQ9r/Yd1Y5etjgISJjy+b3ezqgvAJwK1heXgFKqh8hHO3ag40uuleb5aXNLf6c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CHANGELOG: add removal of grub-pv
Message-Id: <E1x9KIn-007EqM-0F@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:34:13 +0000

commit 5ed278157bfdb5cbddb5da56faf6ac5bdc46fe0d
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Wed Sep 23 09:05:35 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    CHANGELOG: add removal of grub-pv
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
 CHANGELOG.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa1a777dd4..a2dd01037b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
      The only known user was the classic-xen fork of Linux.  This does not
      affect Xen kexec support in the kexec-tools package.
    - The example stubdom "c-stubdom" has been removed.
+   - The grub-pv stubdom has been removed.  A grub-pv stubdom from an older
+     Xen version (e.g. 4.22) will still work with Xen 4.23.
 
 ## [4.22.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2026-07-30
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:34:34 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:34:34 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430152.1652748 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIy-0006H2-DU; Wed, 23 Sep 2026 10:34:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430152.1652748; Wed, 23 Sep 2026 10:34:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KIy-0006Gu-Aj; Wed, 23 Sep 2026 10:34:24 +0000
Received: by outflank-mailman (input) for mailman id 1430152;
 Wed, 23 Sep 2026 10:34:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KIx-0006Go-7v
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:34:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIw-00DV6Z-2s
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KIx-007FxF-0Z
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=CmkDDXFoX2c9rtXRTt3uSrFT2wuXSjPb0kkFvY3aakw=; b=5E0lan/vfEAMnmzvNfwH+ON7Bq
	53+5Hm1Q+HybbmnuWPp6FV6c6PNSPnkNSxvXF4j1VzWNAof7YpSZo2Qft8ZLs6UUecY3SgpFur9e3
	N0s1tS6+1JdrxNgTCVbmWIZh3+5kUXG0oM70lWVpbFZ5HcYsen3dZkbU25BYsEWfVCFE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again
Message-Id: <E1x9KIx-007FxF-0Z@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:34:23 +0000

commit e35ef4439b69de9ebbda355ec74a25e0487c52a7
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:05:53 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    Arm: drop ENFORCE_UNIQUE_SYMBOLS=y workaround again
    
    Both arm<NN>/head.S and arm<NN>/mmu/head.S have a local symbol "fail".
    Without a .file directive locals will be associated with the path-less
    object filename (head.o). Hence the two symbol names collide. Add .file,
    also in arm<NN>/mpu/head.S for consistency.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/Makefile         | 3 ---
 xen/arch/arm/arm32/head.S     | 2 ++
 xen/arch/arm/arm32/mmu/head.S | 2 ++
 xen/arch/arm/arm32/mpu/head.S | 2 ++
 xen/arch/arm/arm64/head.S     | 2 ++
 xen/arch/arm/arm64/mmu/head.S | 2 ++
 xen/arch/arm/arm64/mpu/head.S | 2 ++
 7 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index e9b003610b..eeb0efdb7e 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -91,9 +91,6 @@ include scripts/Makefile.link
 # Suppress orphan section checking for the time being.
 orphan-handling-y :=
 
-# Downgrade duplicate symbol errors to warnings for the time being.
-syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --warn-dup
-
 .PHONY: include
 include:
 
diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 63453dd3a3..7d68e69c5e 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -17,6 +17,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm32/mmu/head.S b/xen/arch/arm/arm32/mmu/head.S
index 3731322f7e..0999181de4 100644
--- a/xen/arch/arm/arm32/mmu/head.S
+++ b/xen/arch/arm/arm32/mmu/head.S
@@ -5,6 +5,8 @@
  * Arm32 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm32/mpu/head.S b/xen/arch/arm/arm32/mpu/head.S
index 6a631626a7..3f5c404c4d 100644
--- a/xen/arch/arm/arm32/mpu/head.S
+++ b/xen/arch/arm/arm32/mpu/head.S
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R-AArch32 MPU system.
  */
 
+    .file __FILE__
+
 #include <asm/arm32/macros.h>
 #include <asm/arm32/sysregs.h>
 #include <asm/cpregs.h>
diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 72c7b24498..7d1e205353 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -20,6 +20,8 @@
  * GNU General Public License for more details.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm64/mmu/head.S b/xen/arch/arm/arm64/mmu/head.S
index 8e514d2114..aabbd4f421 100644
--- a/xen/arch/arm/arm64/mmu/head.S
+++ b/xen/arch/arm/arm64/mmu/head.S
@@ -5,6 +5,8 @@
  * Arm64 MMU specific start-of-day code.
  */
 
+        .file __FILE__
+
 #include <asm/page.h>
 #include <asm/early_printk.h>
 
diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S
index 5df0af571e..960d20a841 100644
--- a/xen/arch/arm/arm64/mpu/head.S
+++ b/xen/arch/arm/arm64/mpu/head.S
@@ -3,6 +3,8 @@
  * Start-of-day code for an Armv8-R MPU system.
  */
 
+    .file __FILE__
+
 #include <asm/mpu/regions.inc>
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Sep 23 10:34:44 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Sep 2026 10:34:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1430153.1652751 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KJ8-0006Iz-Ea; Wed, 23 Sep 2026 10:34:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1430153.1652751; Wed, 23 Sep 2026 10:34:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9KJ8-0006Ir-C4; Wed, 23 Sep 2026 10:34:34 +0000
Received: by outflank-mailman (input) for mailman id 1430153;
 Wed, 23 Sep 2026 10:34:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9KJ7-0006Ij-Ac
 for xen-changelog@lists.xenproject.org; Wed, 23 Sep 2026 10:34:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KJ6-00DV6d-39
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9KJ7-007H0c-0s
 for xen-changelog@lists.xenproject.org;
 Wed, 23 Sep 2026 10:34:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=l+oIcGvbvdOFnbFEb8Zl45DAD+cnYFfBHP5qLDy3ExE=; b=UKgKieSSPXCB3cXa6JRyX3ZxuT
	RISPCthnBNv0OwufZN0c9t8dYy5X/fmTJwTKs3vJ0sq8HU/Nytz4j0ASQqvFWw4+nSbViNAJCx0Lt
	mobayRa9Pavb1cQDavCJPFUuPUqLv4yt7yBbXZ7qgrsTKRJshQWq+ENAO+3EdX/A/JNA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] automation/Eclair: tag directive 4.3 as well as rules 17.2 and 21.17 as clean
Message-Id: <E1x9KJ7-007H0c-0s@xenbits.xenproject.org>
Date: Wed, 23 Sep 2026 10:34:33 +0000

commit f6ccb8effe4b749b14df2f5b5763a87e7a47cc1a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Sep 23 09:06:32 2026 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Sep 23 10:01:38 2026 +0200

    automation/Eclair: tag directive 4.3 as well as rules 17.2 and 21.17 as clean
    
    These have been clean for a while already, without being marked so.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Roger Pau Monné <roger@xenproject.org>
---
 automation/eclair_analysis/ECLAIR/tagging.ecl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/automation/eclair_analysis/ECLAIR/tagging.ecl b/automation/eclair_analysis/ECLAIR/tagging.ecl
index eeccb57426..3f3a00c8cb 100644
--- a/automation/eclair_analysis/ECLAIR/tagging.ecl
+++ b/automation/eclair_analysis/ECLAIR/tagging.ecl
@@ -23,6 +23,7 @@
 "MC3A2.D1.1||
 MC3A2.D2.1||
 MC3A2.D4.1||
+MC3A2.D4.3||
 MC3A2.D4.7||
 MC3A2.D4.10||
 MC3A2.D4.11||
@@ -77,6 +78,7 @@ MC3A2.R16.3||
 MC3A2.R16.6||
 MC3A2.R16.7||
 MC3A2.R17.1||
+MC3A2.R17.2||
 MC3A2.R17.3||
 MC3A2.R17.4||
 MC3A2.R17.5||
@@ -105,6 +107,7 @@ MC3A2.R21.10||
 MC3A2.R21.11||
 MC3A2.R21.12||
 MC3A2.R21.13||
+MC3A2.R21.17||
 MC3A2.R21.18||
 MC3A2.R21.19||
 MC3A2.R21.20||
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 20:55:06 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 20:55:06 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433024.1653848 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qT9-0004Zu-KP; Thu, 24 Sep 2026 20:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433024.1653848; Thu, 24 Sep 2026 20:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qT9-0004Zm-HQ; Thu, 24 Sep 2026 20:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1433024;
 Thu, 24 Sep 2026 20:55:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9qT8-0004Zb-M0
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 20:55:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qT8-00FkmN-0D
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qT8-003IqV-18
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=5U0YBxcvbp0VWQwbPYxVmjR3VYffL/od69zKGBTHCmI=; b=P70HfKL2m8ygjGV8WoqCQ/TMwa
	Ge/yim+tB8CZADcXIuR2efSd/hvgR+vdkgPje6sNzcAmD/jP4YAQRGYJeCE6dJAl3gEF2YDV/RxH0
	9nLNPT1hNAs12/cn1Pl6rE4SXgttwpkkA7KXS2GwUmjO3Nn2mH3qckMvvNVDoeDjD8wQ=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/amd: Expand comment about NullSelectorClearsBase
Message-Id: <E1x9qT8-003IqV-18@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 20:55:02 +0000

commit 228c881efc3e867233772548676f5fa863aec67d
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Mar 2 19:30:39 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86/amd: Expand comment about NullSelectorClearsBase
    
    Rework detect_zen2_null_seg_behaviour() to use the new MSR infrastructure.
    
    Zen2 doesn't have WRMSRNS so don't bother relaxing the write.  All it will do
    is insert a useless alternative.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/amd.c   | 17 ++++++++---------
 xen/arch/x86/cpu/hygon.c |  5 ++++-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 70783c9a0a..ddd73f64c2 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -828,15 +828,11 @@ void amd_init_spectral_chicken(void)
 
 void __init detect_zen2_null_seg_behaviour(void)
 {
-	uint64_t base;
-
-	wrmsrl(MSR_FS_BASE, 1);
-	asm volatile ( "mov %0, %%fs" :: "r" (0) );
-	rdmsrl(MSR_FS_BASE, base);
-
-	if (base == 0)
-		setup_force_cpu_cap(X86_FEATURE_NSCB);
+    wrmsr(MSR_FS_BASE, 1);
+    asm volatile ( "mov %0, %%fs" :: "r" (0) );
 
+    if ( rdmsr(MSR_FS_BASE) == 0 )
+        setup_force_cpu_cap(X86_FEATURE_NSCB);
 }
 
 static void cf_check fam17_disable_c6(void *arg)
@@ -1110,7 +1106,10 @@ static void cf_check init_amd(struct cpuinfo_x86 *c)
 	if (c->family == 0x17)
 		amd_init_spectral_chicken();
 
-	/* Probe for NSCB on Zen2 CPUs when not virtualised */
+	/*
+	 * Zen3 and later enumerate NullSelectorClearsBase.  Zen2 has this
+	 * behaviour but doesn't enumerate it.  Probe when not virtualised.
+	 */
 	if (!cpu_has_hypervisor && !cpu_has_nscb && c == &boot_cpu_data &&
 	    c->family == 0x17)
 		detect_zen2_null_seg_behaviour();
diff --git a/xen/arch/x86/cpu/hygon.c b/xen/arch/x86/cpu/hygon.c
index 7a9fc25d31..ef19c2b367 100644
--- a/xen/arch/x86/cpu/hygon.c
+++ b/xen/arch/x86/cpu/hygon.c
@@ -39,7 +39,10 @@ static void cf_check init_hygon(struct cpuinfo_x86 *c)
 
 	amd_init_ssbd(c);
 
-	/* Probe for NSCB on Zen2 CPUs when not virtualised */
+	/*
+	 * Zen3 and later enumerate NullSelectorClearsBase.  Zen2 has this
+	 * behaviour but doesn't enumerate it.  Probe when not virtualised.
+	 */
 	if (!cpu_has_hypervisor && !cpu_has_nscb && c == &boot_cpu_data &&
 	    c->family == 0x18)
 		detect_zen2_null_seg_behaviour();
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 20:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 20:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433025.1653851 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qTJ-0004bd-LQ; Thu, 24 Sep 2026 20:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433025.1653851; Thu, 24 Sep 2026 20:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qTJ-0004bV-In; Thu, 24 Sep 2026 20:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1433025;
 Thu, 24 Sep 2026 20:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9qTI-0004bO-Gf
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 20:55:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qTI-00FkmR-0W
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qTI-003IyA-1S
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=UIxKPLo+zS0VwFyREDiU3yxvuLsuV2aKN5FT0uShfag=; b=4x4P2i8xTKiv2WANlWi7F1JqO5
	bCu/BTem6b22UPqxVQYkaw+rL11/RYE9bDZayrUFUm+577rdpmc9CsIP4VB8XUISME1XMRhm5sHH/
	Hp2oTXNahLe4/XlBmEGCIcc8BvbARgKyM2RPosQzhh1XXCT7FDZDUWwACj2pL7Y1p3U4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/hvm: Use system descriptor type names in hvm_task_switch()
Message-Id: <E1x9qTI-003IyA-1S@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 20:55:12 +0000

commit 384a4d98f8233cc461cc03082792dec0e7b33621
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Aug 20 10:09:25 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86/hvm: Use system descriptor type names in hvm_task_switch()
    
    ... rather than magic numbers.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 192309c2fc..d62f0b3866 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3067,7 +3067,8 @@ void hvm_task_switch(
     if ( tr.g )
         tr.limit = (tr.limit << 12) | 0xfffu;
 
-    if ( tr.type != ((taskswitch_reason == TSW_iret) ? 0xb : 0x9) )
+    if ( tr.type != (taskswitch_reason == TSW_iret
+                     ? SYS_DESC_tss_busy : SYS_DESC_tss_avail) )
     {
         hvm_inject_hw_exception(
             (taskswitch_reason == TSW_iret) ? X86_EXC_TS : X86_EXC_GP,
@@ -3193,7 +3194,7 @@ void hvm_task_switch(
             goto out;
     }
 
-    tr.type = 0xb; /* busy 32-bit tss */
+    tr.type = SYS_DESC_tss_busy;
     hvm_set_segment_register(v, x86_seg_tss, &tr);
 
     v->arch.hvm.guest_cr[0] |= X86_CR0_TS;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 20:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 20:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433027.1653856 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qTT-0004dp-Mm; Thu, 24 Sep 2026 20:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433027.1653856; Thu, 24 Sep 2026 20:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qTT-0004dh-KA; Thu, 24 Sep 2026 20:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1433027;
 Thu, 24 Sep 2026 20:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9qTS-0004da-Jb
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 20:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qTS-00FkmZ-0n
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qTS-003J68-1k
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=iimm9ADFAN5WstHlCVGdsQ1Q/KCfcrIVeKBoonC86qs=; b=Z0CVUhG4oDoYS4JYubMH/wehrb
	HzHnOmvGShbixAJgKVyMJr2w2aSCT4HLdIHtIE0DY2FE9O5saA1QW8ghtYvxFuEsdILqHTGpooviu
	sML4zCf1d2Az0vyNTjFamw39gshs+qEFbdfNAb0Z54sEuzjahfmIXz9ZRZFWnh2eDIDU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86: Sort headers
Message-Id: <E1x9qTS-003J68-1k@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 20:55:22 +0000

commit a76479836d8a093f5ed2ee0655a5b98239c1e616
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Feb 5 12:53:03 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86: Sort headers
    
    ... prior to making changes.
    
    mtrr/main.c absolutely does not need to include asm/uaccess.h
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/mtrr/generic.c | 10 ++++++----
 xen/arch/x86/cpu/mtrr/main.c    |  5 +++--
 xen/arch/x86/mm/p2m-ept.c       | 22 ++++++++++++----------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c
index 23c279eb9a..4cc7c8bd5d 100644
--- a/xen/arch/x86/cpu/mtrr/generic.c
+++ b/xen/arch/x86/cpu/mtrr/generic.c
@@ -1,17 +1,19 @@
 /* This only handles 32bit MTRR on 32bit hosts. This is strictly wrong
    because MTRRs can span upto 40 bits (36bits on most modern x86) */ 
-#include <xen/lib.h>
+
 #include <xen/init.h>
+#include <xen/lib.h>
 #include <xen/mm.h>
 #include <xen/param.h>
-#include <xen/stdbool.h>
+
+#include <asm/cpufeature.h>
 #include <asm/flushtlb.h>
 #include <asm/invpcid.h>
 #include <asm/io.h>
-#include <asm/mtrr.h>
 #include <asm/msr.h>
+#include <asm/mtrr.h>
 #include <asm/system.h>
-#include <asm/cpufeature.h>
+
 #include "mtrr.h"
 
 static const struct fixed_range_block {
diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c
index d4f549d92e..eff0500f0d 100644
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -34,11 +34,12 @@
 #include <xen/lib.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
+
 #include <asm/atomic.h>
+#include <asm/msr.h>
 #include <asm/mtrr.h>
-#include <asm/uaccess.h>
 #include <asm/processor.h>
-#include <asm/msr.h>
+
 #include "mtrr.h"
 
 /* No blocking mutexes in Xen. Spin instead. */
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index dfdbfa0afe..204bdb054a 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -5,22 +5,24 @@
  */
 
 #include <xen/domain_page.h>
+#include <xen/iommu.h>
+#include <xen/keyhandler.h>
 #include <xen/sched.h>
-#include <public/hvm/dm_op.h>
+#include <xen/softirq.h>
+
 #include <asm/altp2m.h>
 #include <asm/current.h>
-#include <asm/iocap.h>
-#include <asm/paging.h>
 #include <asm/domain.h>
-#include <asm/p2m.h>
-#include <asm/hvm/vmx/vmx.h>
-#include <asm/hvm/vmx/vmcs.h>
+#include <asm/hvm/cacheattr.h>
 #include <asm/hvm/nestedhvm.h>
-#include <xen/iommu.h>
+#include <asm/hvm/vmx/vmcs.h>
+#include <asm/hvm/vmx/vmx.h>
+#include <asm/iocap.h>
 #include <asm/mtrr.h>
-#include <asm/hvm/cacheattr.h>
-#include <xen/keyhandler.h>
-#include <xen/softirq.h>
+#include <asm/p2m.h>
+#include <asm/paging.h>
+
+#include <public/hvm/dm_op.h>
 
 #include "mm-locks.h"
 #include "p2m.h"
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 20:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 20:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433028.1653860 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qTd-0004hC-OD; Thu, 24 Sep 2026 20:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433028.1653860; Thu, 24 Sep 2026 20:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9qTd-0004h4-Lb; Thu, 24 Sep 2026 20:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1433028;
 Thu, 24 Sep 2026 20:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9qTc-0004gw-ML
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 20:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qTc-00Fkmd-15
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9qTc-003JCR-21
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 20:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=MeTGhfjkddW4MLKtk+4DFETEfJWmn3ps41vbGTlidoA=; b=MMmmkHveRcLqirAGISdScbVB17
	l5HKlix2Eo2vX9ghznL4uG1Y9hGvj6hI7/FeyPpi/JBIM/dzaI23aowNR3P8Qq10s4H4Ov8I3Av1x
	iMVT0ziiPy8ntZMWD6xs9r8Ks5L9hANh9MzVx1oogfgvhJr0Icjp5eiRWYKG9NHk/trU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86/boot: Force error checking for reserve_e820_ram()
Message-Id: <E1x9qTc-003JCR-21@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 20:55:32 +0000

commit b7c0ac446722e9d3aa05a025a96a5fc901e2881d
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Apr 17 16:21:41 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86/boot: Force error checking for reserve_e820_ram()
    
    Failing to mark Xen as Reserved in the E820 is catastrophic; RAM regions get
    handed to the physical memory allocator for general use.  Similarly, failure
    to mark the boot modules as reserved is not going to result in a working
    system.
    
    Mark reserve_e820_ram() as __must_check, and panic() on failure.  To avoid
    opencoding the range in every caller, print a general failure message in
    reserve_e820_ram().
    
    Reported-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/e820.c             |  8 +++++++-
 xen/arch/x86/include/asm/e820.h |  3 ++-
 xen/arch/x86/setup.c            | 11 +++++++----
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index 872208ab37..f09a01f0c5 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -670,7 +670,13 @@ int __init e820_change_range_type(
 /* Set E820_RAM area (@s,@e) as RESERVED in specified e820 map. */
 int __init reserve_e820_ram(struct e820map *map, uint64_t s, uint64_t e)
 {
-    return e820_change_range_type(map, s, e, E820_RAM, E820_RESERVED);
+    int res = e820_change_range_type(map, s, e, E820_RAM, E820_RESERVED);
+
+    if ( !res )
+        printk("Failed to convert E820 RAM %"PRIx64"-%"PRIx64" to RESERVED\n",
+               s, e);
+
+    return res;
 }
 
 unsigned long __init init_e820(const char *str, struct e820map *raw)
diff --git a/xen/arch/x86/include/asm/e820.h b/xen/arch/x86/include/asm/e820.h
index 8e7644f887..55395f8d8a 100644
--- a/xen/arch/x86/include/asm/e820.h
+++ b/xen/arch/x86/include/asm/e820.h
@@ -25,7 +25,8 @@ struct e820map {
 
 extern int sanitize_e820_map(struct e820entry *biosmap, unsigned int *pnr_map);
 extern int e820_all_mapped(u64 start, u64 end, unsigned type);
-extern int reserve_e820_ram(struct e820map *map, uint64_t s, uint64_t e);
+extern int __must_check reserve_e820_ram(
+    struct e820map *map, uint64_t s, uint64_t e);
 extern int e820_change_range_type(
     struct e820map *map, uint64_t s, uint64_t e,
     uint32_t orig_type, uint32_t new_type);
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index a636e3205c..9cb858a803 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1648,7 +1648,8 @@ void asmlinkage __init noreturn __start_xen(void)
     {
         uint64_t s = bi->mods[i].start, l = bi->mods[i].size;
 
-        reserve_e820_ram(&boot_e820, s, s + PAGE_ALIGN(l));
+        if ( !reserve_e820_ram(&boot_e820, s, s + PAGE_ALIGN(l)) )
+            panic("Failed to reserve boot module %u in E820\n", i);
     }
 
     if ( !xen_phys_start )
@@ -1661,11 +1662,13 @@ void asmlinkage __init noreturn __start_xen(void)
     /* This needs to remain in sync with remove_xen_ranges(). */
     if ( efi_boot_mem_unused(&eb_start, &eb_end) )
     {
-        reserve_e820_ram(&boot_e820, __pa(_stext), __pa(eb_start));
-        reserve_e820_ram(&boot_e820, __pa(eb_end), __pa(__2M_rwdata_end));
+        if ( !reserve_e820_ram(&boot_e820, __pa(_stext), __pa(eb_start)) ||
+             !reserve_e820_ram(&boot_e820, __pa(eb_end), __pa(__2M_rwdata_end)) )
+            panic("Failed to reserve Xen in E820\n");
     }
     else
-        reserve_e820_ram(&boot_e820, __pa(_stext), __pa(__2M_rwdata_end));
+        if ( !reserve_e820_ram(&boot_e820, __pa(_stext), __pa(__2M_rwdata_end)) )
+            panic("Failed to reserve Xen in E820\n");
 
     /* Late kexec reservation (dynamic start address). */
     kexec_reserve_area();
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 22:22:10 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 22:22:10 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433118.1653926 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpL-0003uI-GT; Thu, 24 Sep 2026 22:22:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433118.1653926; Thu, 24 Sep 2026 22:22:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpL-0003uA-E6; Thu, 24 Sep 2026 22:22:03 +0000
Received: by outflank-mailman (input) for mailman id 1433118;
 Thu, 24 Sep 2026 22:22:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9rpK-0003u2-Eu
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 22:22:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpK-00Fmo9-03
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpK-004Hl1-0w
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=q31lUWTeixK1f2riUbAtcdymeWBx3MqLGFzlXOFBNm4=; b=3kGLJvvvMVQU93TD0Q3DF6l7C3
	veGmzZJ/836NVVP1B4RUjpTPaCUyXC/mWrjf+R4iUbXMrOsjw2XMzR2oE/rGZNnqhoWlHTSyrVDqF
	K4Q4r3tNLdvfQrFx6BsEGbD9W0rW7B3hBrlEJyE5j7wsVnTcHKWs84jrHwB6mywtumGg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/amd: Expand comment about NullSelectorClearsBase
Message-Id: <E1x9rpK-004Hl1-0w@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 22:22:02 +0000

commit 228c881efc3e867233772548676f5fa863aec67d
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Mar 2 19:30:39 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86/amd: Expand comment about NullSelectorClearsBase
    
    Rework detect_zen2_null_seg_behaviour() to use the new MSR infrastructure.
    
    Zen2 doesn't have WRMSRNS so don't bother relaxing the write.  All it will do
    is insert a useless alternative.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/amd.c   | 17 ++++++++---------
 xen/arch/x86/cpu/hygon.c |  5 ++++-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 70783c9a0a..ddd73f64c2 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -828,15 +828,11 @@ void amd_init_spectral_chicken(void)
 
 void __init detect_zen2_null_seg_behaviour(void)
 {
-	uint64_t base;
-
-	wrmsrl(MSR_FS_BASE, 1);
-	asm volatile ( "mov %0, %%fs" :: "r" (0) );
-	rdmsrl(MSR_FS_BASE, base);
-
-	if (base == 0)
-		setup_force_cpu_cap(X86_FEATURE_NSCB);
+    wrmsr(MSR_FS_BASE, 1);
+    asm volatile ( "mov %0, %%fs" :: "r" (0) );
 
+    if ( rdmsr(MSR_FS_BASE) == 0 )
+        setup_force_cpu_cap(X86_FEATURE_NSCB);
 }
 
 static void cf_check fam17_disable_c6(void *arg)
@@ -1110,7 +1106,10 @@ static void cf_check init_amd(struct cpuinfo_x86 *c)
 	if (c->family == 0x17)
 		amd_init_spectral_chicken();
 
-	/* Probe for NSCB on Zen2 CPUs when not virtualised */
+	/*
+	 * Zen3 and later enumerate NullSelectorClearsBase.  Zen2 has this
+	 * behaviour but doesn't enumerate it.  Probe when not virtualised.
+	 */
 	if (!cpu_has_hypervisor && !cpu_has_nscb && c == &boot_cpu_data &&
 	    c->family == 0x17)
 		detect_zen2_null_seg_behaviour();
diff --git a/xen/arch/x86/cpu/hygon.c b/xen/arch/x86/cpu/hygon.c
index 7a9fc25d31..ef19c2b367 100644
--- a/xen/arch/x86/cpu/hygon.c
+++ b/xen/arch/x86/cpu/hygon.c
@@ -39,7 +39,10 @@ static void cf_check init_hygon(struct cpuinfo_x86 *c)
 
 	amd_init_ssbd(c);
 
-	/* Probe for NSCB on Zen2 CPUs when not virtualised */
+	/*
+	 * Zen3 and later enumerate NullSelectorClearsBase.  Zen2 has this
+	 * behaviour but doesn't enumerate it.  Probe when not virtualised.
+	 */
 	if (!cpu_has_hypervisor && !cpu_has_nscb && c == &boot_cpu_data &&
 	    c->family == 0x18)
 		detect_zen2_null_seg_behaviour();
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 22:22:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 22:22:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433119.1653931 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpV-0003vh-IJ; Thu, 24 Sep 2026 22:22:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433119.1653931; Thu, 24 Sep 2026 22:22:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpV-0003vZ-FP; Thu, 24 Sep 2026 22:22:13 +0000
Received: by outflank-mailman (input) for mailman id 1433119;
 Thu, 24 Sep 2026 22:22:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9rpU-0003vR-FN
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 22:22:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpU-00FmoK-0O
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpU-004Hrb-1H
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=65jboXLtcU9VwVvgLPKtchOurv0/Aw9/CTY+1nsKbAI=; b=XcEt2TnR1xDBJP1vdNXRfUL9vm
	m4QDTVWEo+BWq2llB5XhJlCCwge9TPQkSk8jylnk1PODVhchw01yBV9E4bBCH+/GsKHBXEUFJiDbK
	LQOoIlYx4eFYWVXj13abe7x5smrxlBuOQj13O8NTzS1Zgko55/z1Ere3gtVaj7J2oNgo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/hvm: Use system descriptor type names in hvm_task_switch()
Message-Id: <E1x9rpU-004Hrb-1H@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 22:22:12 +0000

commit 384a4d98f8233cc461cc03082792dec0e7b33621
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Aug 20 10:09:25 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86/hvm: Use system descriptor type names in hvm_task_switch()
    
    ... rather than magic numbers.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 192309c2fc..d62f0b3866 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3067,7 +3067,8 @@ void hvm_task_switch(
     if ( tr.g )
         tr.limit = (tr.limit << 12) | 0xfffu;
 
-    if ( tr.type != ((taskswitch_reason == TSW_iret) ? 0xb : 0x9) )
+    if ( tr.type != (taskswitch_reason == TSW_iret
+                     ? SYS_DESC_tss_busy : SYS_DESC_tss_avail) )
     {
         hvm_inject_hw_exception(
             (taskswitch_reason == TSW_iret) ? X86_EXC_TS : X86_EXC_GP,
@@ -3193,7 +3194,7 @@ void hvm_task_switch(
             goto out;
     }
 
-    tr.type = 0xb; /* busy 32-bit tss */
+    tr.type = SYS_DESC_tss_busy;
     hvm_set_segment_register(v, x86_seg_tss, &tr);
 
     v->arch.hvm.guest_cr[0] |= X86_CR0_TS;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 22:22:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 22:22:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433120.1653935 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpf-0003xy-K3; Thu, 24 Sep 2026 22:22:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433120.1653935; Thu, 24 Sep 2026 22:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpf-0003xo-Gi; Thu, 24 Sep 2026 22:22:23 +0000
Received: by outflank-mailman (input) for mailman id 1433120;
 Thu, 24 Sep 2026 22:22:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9rpe-0003xf-IW
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 22:22:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpe-00FmoS-0h
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpe-004Hvl-1c
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=pjptBoPkuEVNV+FIazRW6vsrfkv+db1LfjDkgeHgXhE=; b=31VsSFWNS3x9xI2gQYtIZ9kWIE
	r1dZJsRoC8kXkVUhOHmZcA+sVv9NEFAgHjtxL2hSmIZHOb8GGYxqYMD9iUuhMOwSaq2S+vx/3mQrD
	JIAXKQZoPFPmT1tXDkxaDj7Etrc/B0woRVp+pEGAcvUiw5tZXWQ3t/DQ3oOTBZ7/Py1c=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86: Sort headers
Message-Id: <E1x9rpe-004Hvl-1c@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 22:22:22 +0000

commit a76479836d8a093f5ed2ee0655a5b98239c1e616
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Feb 5 12:53:03 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86: Sort headers
    
    ... prior to making changes.
    
    mtrr/main.c absolutely does not need to include asm/uaccess.h
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/cpu/mtrr/generic.c | 10 ++++++----
 xen/arch/x86/cpu/mtrr/main.c    |  5 +++--
 xen/arch/x86/mm/p2m-ept.c       | 22 ++++++++++++----------
 3 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c
index 23c279eb9a..4cc7c8bd5d 100644
--- a/xen/arch/x86/cpu/mtrr/generic.c
+++ b/xen/arch/x86/cpu/mtrr/generic.c
@@ -1,17 +1,19 @@
 /* This only handles 32bit MTRR on 32bit hosts. This is strictly wrong
    because MTRRs can span upto 40 bits (36bits on most modern x86) */ 
-#include <xen/lib.h>
+
 #include <xen/init.h>
+#include <xen/lib.h>
 #include <xen/mm.h>
 #include <xen/param.h>
-#include <xen/stdbool.h>
+
+#include <asm/cpufeature.h>
 #include <asm/flushtlb.h>
 #include <asm/invpcid.h>
 #include <asm/io.h>
-#include <asm/mtrr.h>
 #include <asm/msr.h>
+#include <asm/mtrr.h>
 #include <asm/system.h>
-#include <asm/cpufeature.h>
+
 #include "mtrr.h"
 
 static const struct fixed_range_block {
diff --git a/xen/arch/x86/cpu/mtrr/main.c b/xen/arch/x86/cpu/mtrr/main.c
index d4f549d92e..eff0500f0d 100644
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -34,11 +34,12 @@
 #include <xen/lib.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
+
 #include <asm/atomic.h>
+#include <asm/msr.h>
 #include <asm/mtrr.h>
-#include <asm/uaccess.h>
 #include <asm/processor.h>
-#include <asm/msr.h>
+
 #include "mtrr.h"
 
 /* No blocking mutexes in Xen. Spin instead. */
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index dfdbfa0afe..204bdb054a 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -5,22 +5,24 @@
  */
 
 #include <xen/domain_page.h>
+#include <xen/iommu.h>
+#include <xen/keyhandler.h>
 #include <xen/sched.h>
-#include <public/hvm/dm_op.h>
+#include <xen/softirq.h>
+
 #include <asm/altp2m.h>
 #include <asm/current.h>
-#include <asm/iocap.h>
-#include <asm/paging.h>
 #include <asm/domain.h>
-#include <asm/p2m.h>
-#include <asm/hvm/vmx/vmx.h>
-#include <asm/hvm/vmx/vmcs.h>
+#include <asm/hvm/cacheattr.h>
 #include <asm/hvm/nestedhvm.h>
-#include <xen/iommu.h>
+#include <asm/hvm/vmx/vmcs.h>
+#include <asm/hvm/vmx/vmx.h>
+#include <asm/iocap.h>
 #include <asm/mtrr.h>
-#include <asm/hvm/cacheattr.h>
-#include <xen/keyhandler.h>
-#include <xen/softirq.h>
+#include <asm/p2m.h>
+#include <asm/paging.h>
+
+#include <public/hvm/dm_op.h>
 
 #include "mm-locks.h"
 #include "p2m.h"
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Sep 24 22:22:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 24 Sep 2026 22:22:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1433121.1653940 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpp-00040l-MC; Thu, 24 Sep 2026 22:22:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1433121.1653940; Thu, 24 Sep 2026 22:22:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1x9rpp-00040c-JM; Thu, 24 Sep 2026 22:22:33 +0000
Received: by outflank-mailman (input) for mailman id 1433121;
 Thu, 24 Sep 2026 22:22:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1x9rpo-00040F-LP
 for xen-changelog@lists.xenproject.org; Thu, 24 Sep 2026 22:22:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpo-00Fmol-0z
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1x9rpo-004I25-1w
 for xen-changelog@lists.xenproject.org;
 Thu, 24 Sep 2026 22:22:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zBDG7qUPiqU7qhapbXiXSa5sRViQVDuZ6tQrTp11uvQ=; b=suspSsmUlkb6A6DEGgEs5hIJs+
	OWxqbKBQspjODKWLa345DQGkRpQqvV8Dj3ph5HICDP/0gHg+aY+En4iUTV+NrKWBRGkd+ifE9VjGy
	R/tzy75Pe6xIgY3qsgcgNMWdZ1wMPO8xWCdGhJZ1r8G6TADNZNeGsxB65rbLIgbozBd0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/boot: Force error checking for reserve_e820_ram()
Message-Id: <E1x9rpo-004I25-1w@xenbits.xenproject.org>
Date: Thu, 24 Sep 2026 22:22:32 +0000

commit b7c0ac446722e9d3aa05a025a96a5fc901e2881d
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Apr 17 16:21:41 2026 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Sep 24 20:54:37 2026 +0100

    x86/boot: Force error checking for reserve_e820_ram()
    
    Failing to mark Xen as Reserved in the E820 is catastrophic; RAM regions get
    handed to the physical memory allocator for general use.  Similarly, failure
    to mark the boot modules as reserved is not going to result in a working
    system.
    
    Mark reserve_e820_ram() as __must_check, and panic() on failure.  To avoid
    opencoding the range in every caller, print a general failure message in
    reserve_e820_ram().
    
    Reported-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/e820.c             |  8 +++++++-
 xen/arch/x86/include/asm/e820.h |  3 ++-
 xen/arch/x86/setup.c            | 11 +++++++----
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index 872208ab37..f09a01f0c5 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -670,7 +670,13 @@ int __init e820_change_range_type(
 /* Set E820_RAM area (@s,@e) as RESERVED in specified e820 map. */
 int __init reserve_e820_ram(struct e820map *map, uint64_t s, uint64_t e)
 {
-    return e820_change_range_type(map, s, e, E820_RAM, E820_RESERVED);
+    int res = e820_change_range_type(map, s, e, E820_RAM, E820_RESERVED);
+
+    if ( !res )
+        printk("Failed to convert E820 RAM %"PRIx64"-%"PRIx64" to RESERVED\n",
+               s, e);
+
+    return res;
 }
 
 unsigned long __init init_e820(const char *str, struct e820map *raw)
diff --git a/xen/arch/x86/include/asm/e820.h b/xen/arch/x86/include/asm/e820.h
index 8e7644f887..55395f8d8a 100644
--- a/xen/arch/x86/include/asm/e820.h
+++ b/xen/arch/x86/include/asm/e820.h
@@ -25,7 +25,8 @@ struct e820map {
 
 extern int sanitize_e820_map(struct e820entry *biosmap, unsigned int *pnr_map);
 extern int e820_all_mapped(u64 start, u64 end, unsigned type);
-extern int reserve_e820_ram(struct e820map *map, uint64_t s, uint64_t e);
+extern int __must_check reserve_e820_ram(
+    struct e820map *map, uint64_t s, uint64_t e);
 extern int e820_change_range_type(
     struct e820map *map, uint64_t s, uint64_t e,
     uint32_t orig_type, uint32_t new_type);
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index a636e3205c..9cb858a803 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1648,7 +1648,8 @@ void asmlinkage __init noreturn __start_xen(void)
     {
         uint64_t s = bi->mods[i].start, l = bi->mods[i].size;
 
-        reserve_e820_ram(&boot_e820, s, s + PAGE_ALIGN(l));
+        if ( !reserve_e820_ram(&boot_e820, s, s + PAGE_ALIGN(l)) )
+            panic("Failed to reserve boot module %u in E820\n", i);
     }
 
     if ( !xen_phys_start )
@@ -1661,11 +1662,13 @@ void asmlinkage __init noreturn __start_xen(void)
     /* This needs to remain in sync with remove_xen_ranges(). */
     if ( efi_boot_mem_unused(&eb_start, &eb_end) )
     {
-        reserve_e820_ram(&boot_e820, __pa(_stext), __pa(eb_start));
-        reserve_e820_ram(&boot_e820, __pa(eb_end), __pa(__2M_rwdata_end));
+        if ( !reserve_e820_ram(&boot_e820, __pa(_stext), __pa(eb_start)) ||
+             !reserve_e820_ram(&boot_e820, __pa(eb_end), __pa(__2M_rwdata_end)) )
+            panic("Failed to reserve Xen in E820\n");
     }
     else
-        reserve_e820_ram(&boot_e820, __pa(_stext), __pa(__2M_rwdata_end));
+        if ( !reserve_e820_ram(&boot_e820, __pa(_stext), __pa(__2M_rwdata_end)) )
+            panic("Failed to reserve Xen in E820\n");
 
     /* Late kexec reservation (dynamic start address). */
     kexec_reserve_area();
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Sep 25 14:55:07 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 25 Sep 2026 14:55:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1434054.1654233 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7KJ-0000XP-B2; Fri, 25 Sep 2026 14:55:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1434054.1654233; Fri, 25 Sep 2026 14:55:03 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7KJ-0000XH-8L; Fri, 25 Sep 2026 14:55:03 +0000
Received: by outflank-mailman (input) for mailman id 1434054;
 Fri, 25 Sep 2026 14:55:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1xA7KH-0000X8-Rg
 for xen-changelog@lists.xenproject.org; Fri, 25 Sep 2026 14:55:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7KH-00HK8o-1c
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7KH-00E7as-2Y
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qnShx8j+0t45X3dmnAk6LXzHP4dxYxsx6ljvpdN2+hY=; b=rWrfdj/lS4jEPCkNAI5M2Fz8qY
	QHm5wwNUo++l2uh81TlwTJQweXyjlE2+ink933KRpODQR/O2Fi7545ChWNQDv1a9QfSNoa3yujUVb
	Og3MhyWjM0Q3G8QFneZHme9AG4gI+9M3g9bYfipSDg4cLpEHReQDxPXyYrs7mPPjvgg4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] stubdom: remove pciutils
Message-Id: <E1xA7KH-00E7as-2Y@xenbits.xenproject.org>
Date: Fri, 25 Sep 2026 14:55:01 +0000

commit 2a57c244ec9db08c3837210478944a8f3c7c8116
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Tue Sep 22 09:27:09 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 25 14:44:27 2026 +0100

    stubdom: remove pciutils
    
    There is no user of libpci left in stubdoms.
    
    Remove libpci from the stubdom build system.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 config/Stubdom.mk.in      |   3 -
 stubdom/.gitignore        |   1 -
 stubdom/Makefile          |  36 +-----
 stubdom/configure         |  21 ----
 stubdom/configure.ac      |   1 -
 stubdom/libpci.config.h   |   5 -
 stubdom/libpci.config.mak |   7 --
 stubdom/pciutils.patch    | 298 ----------------------------------------------
 8 files changed, 6 insertions(+), 366 deletions(-)

diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in
index 0d70d03941..b90eaee75a 100644
--- a/config/Stubdom.mk.in
+++ b/config/Stubdom.mk.in
@@ -14,9 +14,6 @@ STUBDOM_INSTALL     := @STUBDOM_INSTALL@
 ZLIB_VERSION        := @ZLIB_VERSION@
 ZLIB_URL            := @ZLIB_URL@
 
-LIBPCI_VERSION      := @LIBPCI_VERSION@
-LIBPCI_URL          := @LIBPCI_URL@
-
 NEWLIB_VERSION      := @NEWLIB_VERSION@
 NEWLIB_URL          := @NEWLIB_URL@
 
diff --git a/stubdom/.gitignore b/stubdom/.gitignore
index 08f2e9b432..8c6dc00f83 100644
--- a/stubdom/.gitignore
+++ b/stubdom/.gitignore
@@ -23,7 +23,6 @@
 /mk-headers-*
 /newlib-1.*
 /newlib-x86*
-/pciutils-*
 /pkg-config/*
 /polarssl-*
 /tpm_emulator-*
diff --git a/stubdom/Makefile b/stubdom/Makefile
index 40b6ececf1..254f8d2fc8 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -122,33 +122,10 @@ $(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
 	  $(MAKE) DESTDIR= libz.a && \
 	  $(MAKE) DESTDIR= install )
 
-##############
-# Cross-libpci
-##############
-
-pciutils-$(LIBPCI_VERSION).tar.bz2:
-	$(FETCHER) $@ $(LIBPCI_URL)/$@
-
-pciutils-$(XEN_TARGET_ARCH): pciutils-$(LIBPCI_VERSION).tar.bz2
-	tar xjf $<
-	mv pciutils-$(LIBPCI_VERSION) $@
-	patch -d $@ -p1 < pciutils.patch
-	touch $@
-
-LIBPCI_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libpci.a
-.PHONY: cross-libpci
-cross-libpci: $(LIBPCI_STAMPFILE)
-$(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(ZLIB_STAMPFILE)
-	( cd $< && \
-	  cp ../libpci.config.h lib/config.h && \
-	  chmod u+w lib/config.h && \
-	  echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \
-	  ln -sf ../../libpci.config.mak lib/config.mk && \
-	  $(MAKE) DESTDIR= CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(call realpath,$(MINI_OS)/include)" lib/libpci.a && \
-	  $(INSTALL_DATA) lib/libpci.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ && \
-	  $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \
-	  $(INSTALL_DATA) lib/config.h lib/header.h lib/pci.h lib/types.h $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci/ \
-	)
+#######################################################################
+# There used to be a slightly modified version of pciutils, this is now
+# available under https://github.com/pciutils/pciutils/pull/236
+#######################################################################
 
 ######
 # lwIP
@@ -250,7 +227,7 @@ cross-tpmemu: $(TPMEMU_STAMPFILE)
 #######
 
 .PHONY: $(CROSS_ROOT)
-$(CROSS_ROOT): cross-newlib cross-zlib cross-libpci
+$(CROSS_ROOT): cross-newlib cross-zlib
 
 #######
 # libraries under tools/libs
@@ -477,7 +454,7 @@ clean:
 crossclean: clean
 	rm -fr $(CROSS_ROOT)
 	rm -fr newlib-$(XEN_TARGET_ARCH)
-	rm -fr zlib-$(XEN_TARGET_ARCH) pciutils-$(XEN_TARGET_ARCH)
+	rm -fr zlib-$(XEN_TARGET_ARCH)
 	rm -fr libs-$(XEN_TARGET_ARCH)
 	rm -fr xenstore xenstorepvh
 	rm -fr gmp-$(XEN_TARGET_ARCH)
@@ -502,7 +479,6 @@ downloadclean: patchclean
 	rm -f zlib-$(ZLIB_VERSION).tar.gz
 	rm -f gmp-$(GMP_VERSION).tar.bz2
 	rm -f tpm_emulator-$(TPMEMU_VERSION).tar.gz
-	rm -f pciutils-$(LIBPCI_VERSION).tar.bz2
 	rm -f lwip-$(LWIP_VERSION).tar.gz
 	rm -f polarssl-$(POLARSSL_VERSION)-gpl.tgz
 
diff --git a/stubdom/configure b/stubdom/configure
index 689ff4d6ed..f3d63dceff 100755
--- a/stubdom/configure
+++ b/stubdom/configure
@@ -634,8 +634,6 @@ LWIP_VERSION
 LWIP_URL
 NEWLIB_VERSION
 NEWLIB_URL
-LIBPCI_VERSION
-LIBPCI_URL
 ZLIB_VERSION
 ZLIB_URL
 INSTALL_DATA
@@ -725,7 +723,6 @@ LDFLAGS
 LIBS
 CPPFLAGS
 ZLIB_URL
-LIBPCI_URL
 NEWLIB_URL
 LWIP_URL
 GMP_URL
@@ -1376,7 +1373,6 @@ Some influential environment variables:
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   ZLIB_URL    Download url for zlib
-  LIBPCI_URL  Download url for libpci
   NEWLIB_URL  Download url for newlib
   LWIP_URL    Download url for lwip
   GMP_URL     Download url for libgmp
@@ -4038,23 +4034,6 @@ ZLIB_VERSION="1.2.3"
 
 
 
-if test "x$LIBPCI_URL" = "x"
-then :
-
-	if test "x$extfiles" = "xy"
-then :
-  LIBPCI_URL=\$\(XEN_EXTFILES_URL\)
-else $as_nop
-  LIBPCI_URL="https://mirrors.edge.kernel.org/pub/software/utils/pciutils"
-fi
-
-fi
-LIBPCI_VERSION="2.2.9"
-
-
-
-
-
 if test "x$NEWLIB_URL" = "x"
 then :
 
diff --git a/stubdom/configure.ac b/stubdom/configure.ac
index 6ff3ab0ee9..d3d2a840d3 100644
--- a/stubdom/configure.ac
+++ b/stubdom/configure.ac
@@ -39,7 +39,6 @@ AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake])
 
 # Stubdom libraries version and url setup
 AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3])
-AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [https://mirrors.edge.kernel.org/pub/software/utils/pciutils])
 AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib])
 AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip])
 AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive])
diff --git a/stubdom/libpci.config.h b/stubdom/libpci.config.h
deleted file mode 100644
index 28c2f6ab31..0000000000
--- a/stubdom/libpci.config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#define PCI_OS_MINIOS
-#define PCI_HAVE_STDINT_H
-#define PCI_PATH_IDS_DIR "."
-#define PCI_COMPRESSED_IDS
-#define PCI_IDS "pci.ids.gz"
diff --git a/stubdom/libpci.config.mak b/stubdom/libpci.config.mak
deleted file mode 100644
index 5c8632cf07..0000000000
--- a/stubdom/libpci.config.mak
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBZ=-lz
-LDLIBS+=$(LIBZ)
-PCI_OS_MINIOS=1
-PCI_HAVE_STDINT_H=1
-PCI_PATH_IDS_DIR=.
-PCI_COMPRESSED_IDS=1
-PCI_IDS=pci.ids.gz
diff --git a/stubdom/pciutils.patch b/stubdom/pciutils.patch
deleted file mode 100644
index 5ab84d6cce..0000000000
--- a/stubdom/pciutils.patch
+++ /dev/null
@@ -1,298 +0,0 @@
-diff -urN pciutils-2.2.9.orig/lib/access.c pciutils-2.2.9/lib/access.c
---- pciutils-2.2.9.orig/lib/access.c	2007-02-06 11:59:43.000000000 +0000
-+++ pciutils-2.2.9/lib/access.c	2008-06-30 19:07:09.713187000 +0100
-@@ -57,6 +57,11 @@
- #else
-   NULL,
- #endif
-+#ifdef PCI_OS_MINIOS
-+  &pm_minios,
-+#else
-+  NULL,
-+#endif
- };
- 
- struct pci_access *
---- pciutils-2.2.9.orig/lib/pci.h	2006-09-09 13:46:06.000000000 +0100
-+++ pciutils-2.2.9/lib/pci.h	2008-06-30 18:56:15.350111000 +0100
-@@ -33,6 +33,7 @@
-   PCI_ACCESS_NBSD_LIBPCI,		/* NetBSD libpci */
-   PCI_ACCESS_OBSD_DEVICE,		/* OpenBSD /dev/pci */
-   PCI_ACCESS_DUMP,			/* Dump file (params: filename) */
-+  PCI_ACCESS_MINIOS,			/* MiniOS */
-   PCI_ACCESS_MAX
- };
- 
---- pciutils-2.2.9.orig/lib/internal.h	2006-09-09 11:52:47.000000000 +0100
-+++ pciutils-2.2.9/lib/internal.h	2008-07-01 10:46:24.968202000 +0100
-@@ -37,4 +37,4 @@
- 
- extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc,
- 	pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device,
--	pm_dump, pm_linux_sysfs;
-+	pm_dump, pm_linux_sysfs, pm_minios;
---- pciutils-2.2.9.orig/lib/Makefile	2007-10-19 13:41:34.000000000 +0100
-+++ pciutils-2.2.9/lib/Makefile	2008-07-01 12:13:14.400525000 +0100
-@@ -46,6 +46,12 @@
- PCILIB=libpciutils.a
- endif
- 
-+ifdef PCI_OS_MINIOS
-+XEN_ROOT=$(CURDIR)/../../..
-+include $(XEN_ROOT)/Config.mk
-+OBJS += minios.o
-+endif
-+
- all: $(PCILIB) $(PCILIBPC)
- 
- $(PCILIB): $(OBJS)
---- pciutils-2.2.9.orig/lib/types.h    2009-07-14 18:18:59.000000000 +0200
-+++ pciutils-2.2.9/lib/types.h 2009-07-14 18:19:16.000000000 +0200
-@@ -20,10 +20,12 @@ typedef DWORD u32;
- typedef uint8_t u8;
- typedef uint16_t u16;
- typedef uint32_t u32;
-+typedef uint64_t u64;
- #else
- typedef u_int8_t u8;
- typedef u_int16_t u16;
- typedef u_int32_t u32;
-+typedef u_int64_t u64;
- #endif
-
- #ifdef PCI_HAVE_64BIT_ADDRESS
- 
---- pciutils-2.2.9.orig/lib/minios.c	1970-01-01 01:00:00.000000000 +0100
-+++ pciutils-2.2.9/lib/minios.c	2008-07-01 12:31:40.554260000 +0100
-@@ -0,0 +1,106 @@
-+/*
-+ *	The PCI Library -- MiniOS PCI frontend access
-+ *
-+ *	Samuel Thibault <samuel.thibault@eu.citrix.com>, 2008
-+ *
-+ *	Can be freely distributed and used under the terms of the GNU GPL.
-+ */
-+
-+#include <os.h>
-+#include <pcifront.h>
-+#include <xenbus.h>
-+#include "internal.h"
-+
-+static int
-+minios_detect(struct pci_access *a)
-+{
-+  return 1;
-+}
-+
-+static void
-+minios_init(struct pci_access *a)
-+{
-+}
-+
-+static void
-+minios_cleanup(struct pci_access *a)
-+{
-+  shutdown_pcifront(NULL);
-+}
-+
-+static void
-+minios_scan(struct pci_access *a)
-+{
-+  void func(unsigned int domain, unsigned int bus, unsigned int slot, unsigned int fun)
-+  {
-+    struct pci_dev *d = pci_alloc_dev(a);
-+
-+    d->domain = domain;
-+    d->bus = bus;
-+    d->dev = slot;
-+    d->func = fun;
-+
-+    pci_link_dev(a, d);
-+  }
-+
-+  pcifront_scan(NULL, func);
-+}
-+
-+static int
-+minios_read(struct pci_dev *d, int pos, byte *buf, int len)
-+{
-+  unsigned int val;
-+  switch (len) {
-+    case 1:
-+      if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val))
-+        return 0;
-+      * buf = val;
-+      return 1;
-+    case 2:
-+      if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val))
-+        return 0;
-+      *(u16 *) buf = cpu_to_le16((u16) val);
-+      return 1;
-+    case 4:
-+      if (pcifront_conf_read(NULL, d->domain, d->bus, d->dev, d->func, pos, len, &val))
-+        return 0;
-+      *(u32 *) buf = cpu_to_le32((u32) val);
-+      return 1;
-+    default:
-+      return pci_generic_block_read(d, pos, buf, len);
-+  }
-+}
-+
-+static int
-+minios_write(struct pci_dev *d, int pos, byte *buf, int len)
-+{
-+  unsigned int val;
-+  switch (len) {
-+    case 1:
-+      val = * buf;
-+      break;
-+    case 2:
-+      val = le16_to_cpu(*(u16 *) buf);
-+      break;
-+    case 4:
-+      val = le32_to_cpu(*(u32 *) buf);
-+      break;
-+    default:
-+      return pci_generic_block_write(d, pos, buf, len);
-+  }
-+  return !pcifront_conf_write(NULL, d->domain, d->bus, d->dev, d->func, pos, len, val);
-+}
-+
-+struct pci_methods pm_minios = {
-+  "MiniOS-device",
-+  NULL,                                 /* config */
-+  minios_detect,
-+  minios_init,
-+  minios_cleanup,
-+  minios_scan,
-+  pci_generic_fill_info,
-+  minios_read,
-+  minios_write,
-+  NULL,                                 /* dev_init */
-+  NULL                                  /* dev_cleanup */
-+};
---- pciutils-2.2.9/lib/generic.c	2007-02-06 12:00:05.000000000 +0000
-+++ pciutils-2.2.9-mine/lib/generic.c	2008-07-01 19:13:52.289949000 +0100
-@@ -74,6 +74,19 @@
-   pci_generic_scan_bus(a, busmap, 0);
- }
- 
-+static u32 pci_size(u32 base, u32 maxbase, u32 mask)
-+{
-+  u32 size = mask & maxbase;
-+  if (!size)
-+    return 0;
-+  size = (size & ~(size-1)) - 1;
-+
-+  if (base == maxbase && ((base | size) & mask) != mask)
-+    return 0;
-+
-+  return size + 1;
-+}
-+
- int
- pci_generic_fill_info(struct pci_dev *d, int flags)
- {
-@@ -114,23 +127,61 @@
- 	      if (!x || x == (u32) ~0)
- 		continue;
- 	      if ((x & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
--		d->base_addr[i] = x;
--	      else
-+                {
-+                  d->base_addr[i] = x & PCI_BASE_ADDRESS_IO_MASK;
-+                  if (flags & PCI_FILL_SIZES)
-+                    {
-+                      u32 size;
-+                      pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0);
-+                      d->size[i] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), PCI_BASE_ADDRESS_IO_MASK);
-+                      pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, x);
-+                    }
-+                }
-+              else
- 		{
- 		  if ((x & PCI_BASE_ADDRESS_MEM_TYPE_MASK) != PCI_BASE_ADDRESS_MEM_TYPE_64)
--		    d->base_addr[i] = x;
-+                    {
-+                      d->base_addr[i] = x & PCI_BASE_ADDRESS_MEM_MASK;
-+                      if (flags & PCI_FILL_SIZES)
-+                        {
-+                          u32 size;
-+                          pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0);
-+                          d->size[i] = pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4);
-+                          d->size[i] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), PCI_BASE_ADDRESS_MEM_MASK);
-+                          pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, x);
-+                        }
-+                    }
- 		  else if (i >= cnt-1)
- 		    a->warning("%04x:%02x:%02x.%d: Invalid 64-bit address seen for BAR %d.", d->domain, d->bus, d->dev, d->func, i);
- 		  else
- 		    {
- 		      u32 y = pci_read_long(d, PCI_BASE_ADDRESS_0 + (++i)*4);
- #ifdef PCI_HAVE_64BIT_ADDRESS
--		      d->base_addr[i-1] = x | (((pciaddr_t) y) << 32);
-+		      d->base_addr[i-1] = (x | (((pciaddr_t) y) << 32)) & PCI_BASE_ADDRESS_MEM_MASK;
-+                      if (flags & PCI_FILL_SIZES)
-+                        {
-+                          u32 size;
-+                          pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, ~0);
-+                          pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, ~0);
-+                          d->size[i-1] = pci_size(y, pci_read_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4) | 
-+                                         pci_read_long(d, PCI_BASE_ADDRESS_0 + i*4), 0xffffffff );
-+                          pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, x);
-+                          pci_write_long(d, PCI_BASE_ADDRESS_0 + i*4, y);
-+                        }
- #else
- 		      if (y)
- 			a->warning("%04x:%02x:%02x.%d 64-bit device address ignored.", d->domain, d->bus, d->dev, d->func);
- 		      else
--			d->base_addr[i-1] = x;
-+                        {
-+                          d->base_addr[i-1] = x & PCI_BASE_ADDRESS_MEM_MASK;
-+                          if (flags & PCI_FILL_SIZES)
-+                            {
-+                              u32 size;
-+                              pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, ~0);
-+                              d->size[i-1] = pci_size(x, pci_read_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4), PCI_BASE_ADDRESS_MEM_MASK);
-+                              pci_write_long(d, PCI_BASE_ADDRESS_0 + (i-1)*4, x);
-+                            }
-+                        }
- #endif
- 		    }
- 		}
-@@ -154,10 +205,19 @@
- 	{
- 	  u32 u = pci_read_long(d, reg);
- 	  if (u != 0xffffffff)
--	    d->rom_base_addr = u;
-+            {
-+              d->rom_base_addr = u;
-+              if (flags & PCI_FILL_SIZES)
-+                {
-+                  u32 size;
-+                  pci_write_long(d, reg, ~0);
-+                  d->rom_size = pci_read_long(d, reg);
-+                  pci_write_long(d, reg, u);
-+                }
-+            }
- 	}
-     }
--  return flags & ~PCI_FILL_SIZES;
-+  return flags;
- }
- 
- static int
-diff -uNpbE -uNpbEr pciutils-2.2.9.orig/lib/sysdep.h pciutils-2.2.9/lib/sysdep.h
---- pciutils-2.2.9.orig/lib/sysdep.h	2007-02-06 12:00:18.000000000 +0000
-+++ pciutils-2.2.9/lib/sysdep.h	2009-07-22 16:26:30.000000000 +0100
-@@ -32,6 +32,10 @@ typedef u16 word;
- 
- #else
- 
-+#ifdef PCI_OS_MINIOS
-+#include <machine/endian.h>
-+#endif
-+
- #ifdef PCI_OS_LINUX
- #include <endian.h>
- #define BYTE_ORDER __BYTE_ORDER
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 25 14:55:13 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 25 Sep 2026 14:55:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1434055.1654239 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7KT-0000Za-Dg; Fri, 25 Sep 2026 14:55:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1434055.1654239; Fri, 25 Sep 2026 14:55:13 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7KT-0000ZS-A6; Fri, 25 Sep 2026 14:55:13 +0000
Received: by outflank-mailman (input) for mailman id 1434055;
 Fri, 25 Sep 2026 14:55:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1xA7KR-0000ZI-V3
 for xen-changelog@lists.xenproject.org; Fri, 25 Sep 2026 14:55:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7KR-00HK9u-1w
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7KR-00E83l-2r
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qwnw0KK7OC9FJ7B/ozhyDoVdZ57bJLSqY6bUVNz886A=; b=HkZJIBpRd8ZHE6Svppf3jAHzqt
	41KDMkb3juJ34QFZgJQ+jHwLyyBSijkCZs+jSCNq4t2u0JTCcEZvIQzwC4aqR61iVKaF9sajWIWOA
	Hqbfb/P1L368GFPqvQ0jiw7SKqsS6fjWhnyYLvtwZIpeXxvBApSgcj1MK91kRdZi/yiY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] stubdom: remove build of zlib
Message-Id: <E1xA7KR-00E83l-2r@xenbits.xenproject.org>
Date: Fri, 25 Sep 2026 14:55:11 +0000

commit dd0183b8fab467e19b5c4bce237459e98d1d2332
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Tue Sep 22 09:27:10 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 25 14:44:27 2026 +0100

    stubdom: remove build of zlib
    
    The last users of zlib for stubdoms have been removed.
    
    Remove zlib from the stubdom build system, too.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 config/Stubdom.mk.in |  3 ---
 stubdom/.gitignore   |  1 -
 stubdom/Makefile     | 24 +-----------------------
 stubdom/configure    | 15 ---------------
 stubdom/configure.ac |  1 -
 5 files changed, 1 insertion(+), 43 deletions(-)

diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in
index b90eaee75a..dc0a3b54b3 100644
--- a/config/Stubdom.mk.in
+++ b/config/Stubdom.mk.in
@@ -11,9 +11,6 @@ STUBDOM_TARGETS     := @STUBDOM_TARGETS@
 STUBDOM_BUILD       := @STUBDOM_BUILD@
 STUBDOM_INSTALL     := @STUBDOM_INSTALL@
 
-ZLIB_VERSION        := @ZLIB_VERSION@
-ZLIB_URL            := @ZLIB_URL@
-
 NEWLIB_VERSION      := @NEWLIB_VERSION@
 NEWLIB_URL          := @NEWLIB_URL@
 
diff --git a/stubdom/.gitignore b/stubdom/.gitignore
index 8c6dc00f83..e5d5744361 100644
--- a/stubdom/.gitignore
+++ b/stubdom/.gitignore
@@ -29,4 +29,3 @@
 /vtpm/vtpm_manager.h
 /xenstore
 /xenstorepvh
-/zlib-*
diff --git a/stubdom/Makefile b/stubdom/Makefile
index 254f8d2fc8..164694dd14 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -102,26 +102,6 @@ $(NEWLIB_STAMPFILE): mk-headers-$(XEN_TARGET_ARCH) newlib-$(NEWLIB_VERSION)
 	  $(MAKE) DESTDIR= && \
 	  $(MAKE) DESTDIR= install )
 
-############
-# Cross-zlib
-############
-
-zlib-$(ZLIB_VERSION).tar.gz:
-	$(FETCHER) $@ $(ZLIB_URL)/$@
-
-zlib-$(XEN_TARGET_ARCH): zlib-$(ZLIB_VERSION).tar.gz 
-	tar xzf $<
-	mv zlib-$(ZLIB_VERSION) $@
-
-ZLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libz.a
-.PHONY: cross-zlib
-cross-zlib: $(ZLIB_STAMPFILE)
-$(ZLIB_STAMPFILE): zlib-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
-	( cd $< && \
-	  CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf && \
-	  $(MAKE) DESTDIR= libz.a && \
-	  $(MAKE) DESTDIR= install )
-
 #######################################################################
 # There used to be a slightly modified version of pciutils, this is now
 # available under https://github.com/pciutils/pciutils/pull/236
@@ -227,7 +207,7 @@ cross-tpmemu: $(TPMEMU_STAMPFILE)
 #######
 
 .PHONY: $(CROSS_ROOT)
-$(CROSS_ROOT): cross-newlib cross-zlib
+$(CROSS_ROOT): cross-newlib
 
 #######
 # libraries under tools/libs
@@ -454,7 +434,6 @@ clean:
 crossclean: clean
 	rm -fr $(CROSS_ROOT)
 	rm -fr newlib-$(XEN_TARGET_ARCH)
-	rm -fr zlib-$(XEN_TARGET_ARCH)
 	rm -fr libs-$(XEN_TARGET_ARCH)
 	rm -fr xenstore xenstorepvh
 	rm -fr gmp-$(XEN_TARGET_ARCH)
@@ -476,7 +455,6 @@ patchclean: crossclean
 .PHONY: downloadclean
 downloadclean: patchclean
 	rm -f newlib-$(NEWLIB_VERSION).tar.gz
-	rm -f zlib-$(ZLIB_VERSION).tar.gz
 	rm -f gmp-$(GMP_VERSION).tar.bz2
 	rm -f tpm_emulator-$(TPMEMU_VERSION).tar.gz
 	rm -f lwip-$(LWIP_VERSION).tar.gz
diff --git a/stubdom/configure b/stubdom/configure
index f3d63dceff..1a5687d32b 100755
--- a/stubdom/configure
+++ b/stubdom/configure
@@ -634,8 +634,6 @@ LWIP_VERSION
 LWIP_URL
 NEWLIB_VERSION
 NEWLIB_URL
-ZLIB_VERSION
-ZLIB_URL
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
@@ -722,7 +720,6 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
-ZLIB_URL
 NEWLIB_URL
 LWIP_URL
 GMP_URL
@@ -1372,7 +1369,6 @@ Some influential environment variables:
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
-  ZLIB_URL    Download url for zlib
   NEWLIB_URL  Download url for newlib
   LWIP_URL    Download url for lwip
   GMP_URL     Download url for libgmp
@@ -4023,17 +4019,6 @@ fi
 # Stubdom libraries version and url setup
 
 
-if test "x$ZLIB_URL" = "x"
-then :
-
-	ZLIB_URL=\$\(XEN_EXTFILES_URL\)
-fi
-ZLIB_VERSION="1.2.3"
-
-
-
-
-
 if test "x$NEWLIB_URL" = "x"
 then :
 
diff --git a/stubdom/configure.ac b/stubdom/configure.ac
index d3d2a840d3..34a47c95e1 100644
--- a/stubdom/configure.ac
+++ b/stubdom/configure.ac
@@ -38,7 +38,6 @@ AC_PROG_INSTALL
 AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake])
 
 # Stubdom libraries version and url setup
-AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3])
 AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [https://sourceware.org/ftp/newlib])
 AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [https://download.savannah.gnu.org/releases/lwip])
 AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [https://gmplib.org/download/gmp/archive])
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 25 14:55:23 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 25 Sep 2026 14:55:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1434056.1654241 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7Kd-0000c2-E2; Fri, 25 Sep 2026 14:55:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1434056.1654241; Fri, 25 Sep 2026 14:55:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7Kd-0000bu-BR; Fri, 25 Sep 2026 14:55:23 +0000
Received: by outflank-mailman (input) for mailman id 1434056;
 Fri, 25 Sep 2026 14:55:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1xA7Kc-0000bi-1w
 for xen-changelog@lists.xenproject.org; Fri, 25 Sep 2026 14:55:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7Kb-00HK9y-2H
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7Kb-00E8Wm-3B
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=qTSHszcsdg9jV5IgVcHapzEY/klQtm9LDgJdNGpzsuE=; b=qtSMPjZUD4PN/DV5Z3JLrQQeDa
	LyMjXQDY+jWcGmi4mjAK9lTW0FjzPRjuKlH3J51h4acS1FU9RsMfGJbtBmfZFQmgkFdQgJlqbFBHg
	3IuKLevwBQS/gCZ/8c339IMbQrHYSHOwkHXHwn2qPXRbmgrRWLh3H5zbMGlUcc1ahzSM=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] xen: Consolidate linker script setup data
Message-Id: <E1xA7Kb-00E8Wm-3B@xenbits.xenproject.org>
Date: Fri, 25 Sep 2026 14:55:21 +0000

commit 245043bb3a08e9013d87f9bd158f98ae56bd2a9c
Author:     Jason Andryuk <jason.andryuk@amd.com>
AuthorDate: Wed Sep 23 12:19:35 2026 -0400
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 25 14:44:27 2026 +0100

    xen: Consolidate linker script setup data
    
    .init.setup, .initcallpresmp.init, and .initcall1.init are duplicated
    across architectures.  Replace them with a common define, SETUP_DATA.
    
    Suggested-by: Grygorii Strashko <grygorii_strashko@epam.com>
    Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
    Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/xen.lds.S    | 11 +----------
 xen/arch/ppc/xen.lds.S    | 12 +-----------
 xen/arch/riscv/xen.lds.S  | 12 +-----------
 xen/arch/x86/xen.lds.S    | 11 +----------
 xen/include/xen/xen.lds.h | 12 ++++++++++++
 5 files changed, 16 insertions(+), 42 deletions(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index d4d9594033..32afbfe131 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -135,16 +135,7 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.*)
 
-       . = ALIGN(POINTER_ALIGN);
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-
-       __initcall_start = .;
-       *(.initcallpresmp.init)
-       __presmp_initcall_end = .;
-       *(.initcall1.init)
-       __initcall_end = .;
+       SETUP_DATA
 
        . = ALIGN(4);
        __alt_instructions = .;
diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S
index d0f2ed43f1..37256c8865 100644
--- a/xen/arch/ppc/xen.lds.S
+++ b/xen/arch/ppc/xen.lds.S
@@ -107,17 +107,7 @@ SECTIONS
         *(.init.rodata)
         *(.init.rodata.*)
 
-        . = ALIGN(POINTER_ALIGN);
-        __setup_start = .;
-        *(.init.setup)
-        __setup_end = .;
-
-        __initcall_start = .;
-        *(.initcallpresmp.init)
-        __presmp_initcall_end = .;
-        *(.initcall1.init)
-        __initcall_end = .;
-
+        SETUP_DATA
         LOCK_PROFILE_DATA
 
         *(.init.data)
diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
index 70db658fef..d9375a9616 100644
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -114,17 +114,7 @@ SECTIONS
         *(.init.rodata)
         *(.init.rodata.*)
 
-        . = ALIGN(POINTER_ALIGN);
-        __setup_start = .;
-        *(.init.setup)
-        __setup_end = .;
-
-        __initcall_start = .;
-        *(.initcallpresmp.init)
-        __presmp_initcall_end = .;
-        *(.initcall1.init)
-        __initcall_end = .;
-
+        SETUP_DATA
         LOCK_PROFILE_DATA
 
         *(.init.data)
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index b9e888e596..8f943e11ea 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -223,16 +223,7 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.*)
 
-       . = ALIGN(POINTER_ALIGN);
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-
-       __initcall_start = .;
-       *(.initcallpresmp.init)
-       __presmp_initcall_end = .;
-       *(.initcall1.init)
-       __initcall_end = .;
+       SETUP_DATA
 
        *(.init.data)
        *(.init.data.rel)
diff --git a/xen/include/xen/xen.lds.h b/xen/include/xen/xen.lds.h
index ea11e3fb62..958f8256b0 100644
--- a/xen/include/xen/xen.lds.h
+++ b/xen/include/xen/xen.lds.h
@@ -179,6 +179,18 @@
        *(.data.schedulers)           \
        __end_schedulers_array = .;
 
+#define SETUP_DATA                   \
+       . = ALIGN(POINTER_ALIGN);     \
+       __setup_start = .;            \
+       *(.init.setup)                \
+       __setup_end = .;              \
+                                     \
+       __initcall_start = .;         \
+       *(.initcallpresmp.init)       \
+       __presmp_initcall_end = .;    \
+       *(.initcall1.init)            \
+       __initcall_end = .;
+
 #ifdef CONFIG_HYPFS
 #define HYPFS_PARAM              \
        . = ALIGN(POINTER_ALIGN); \
--
generated by git-patchbot for /home/xen/git/xen.git#staging


From xen-changelog-bounces@lists.xenproject.org Fri Sep 25 14:55:33 2026
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 25 Sep 2026 14:55:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.1434057.1654245 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7Kn-0000eu-Gb; Fri, 25 Sep 2026 14:55:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 1434057.1654245; Fri, 25 Sep 2026 14:55:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1xA7Kn-0000em-E8; Fri, 25 Sep 2026 14:55:33 +0000
Received: by outflank-mailman (input) for mailman id 1434057;
 Fri, 25 Sep 2026 14:55:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <infra@xenproject.org>) id 1xA7Km-0000eZ-5P
 for xen-changelog@lists.xenproject.org; Fri, 25 Sep 2026 14:55:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7Kl-00HKA2-2a
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.96)
 (envelope-from <infra@xenproject.org>) id 1xA7Km-00E91j-0H
 for xen-changelog@lists.xenproject.org;
 Fri, 25 Sep 2026 14:55:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=xenproject.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=xyP53ANYxViTThtgFisMUP0Zppy4pu+lg4baZgXKsq8=; b=hfIw9PcFUj8qgWtkQfKKhiiAdQ
	GWaHwoEJPearznq7RrtfvcDF2HCx0C7M0yYBzp4kljVIC0hImvy7IkW2PSX2V8quvZjCPZPk0DqIO
	H5jAWG5T2cJ7WTWf0jAdWG3EAckLvXTmBNtTrSZWHBJpUuF/bcjx73QnJRABfHjkiFHY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen staging] x86emul: Fix AAM emulation AH output
Message-Id: <E1xA7Km-00E91j-0H@xenbits.xenproject.org>
Date: Fri, 25 Sep 2026 14:55:32 +0000

commit 4c1aba82cff95ab11f7fe4af8965a06703537288
Author:     Teddy Astie <teddy.astie@vates.tech>
AuthorDate: Thu Sep 24 13:59:49 2026 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 25 14:44:27 2026 +0100

    x86emul: Fix AAM emulation AH output
    
    AAM is defined in APM as
    
    AH = (AL/10d)
    AL = (AL mod 10d)
    
    However, due to the order of operations, we're incorrectly computing it as
    
    AL = (AL mod 10d)
    AH = (AL/10d) = ((originalAL mod 10d)/10d) = 0
    
    Fix it by reordering the operations to match what's defined in APM
    and avoid the unexpected dependency between the 2 operations.
    
    Fixes: 8993572b9c16 ("x86emul: fold/eliminate some local variables")
    Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citix.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 89c37fea2c..f168f3ebcf 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -2511,8 +2511,8 @@ x86_emulate(
         else
         {
             generate_exception_if(!n, X86_EXC_DE);
-            _regs.al = _regs.al % n;
             _regs.ah = _regs.al / n;
+            _regs.al = _regs.al % n;
         }
         _regs.eflags &= ~(X86_EFLAGS_SF | X86_EFLAGS_ZF | X86_EFLAGS_PF);
         _regs.eflags |= !_regs.al ? X86_EFLAGS_ZF : 0;
--
generated by git-patchbot for /home/xen/git/xen.git#staging


