[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen: Fix endian handling in muldiv64.c



commit b56a894e99098b71d9e41781cd3a283e097b0942
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Dec 29 11:39:03 2025 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Jan 7 11:53:01 2026 +0000

    xen: Fix endian handling in muldiv64.c
    
    WORDS_BIGENDIAN is a QEMU-ism.  In the very dim and distant past, we had a
    fork of QEMU living in xen.git which wired WORDS_BIGENDIAN in the userspace
    part of the build, but nothing ever wired it up in the hypervisor build.
    
    Fixes: 86d5da49a6f7 ("[HVM] Support multiple HVM time device models coming 
soon.")
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/lib/muldiv64.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/lib/muldiv64.c b/xen/lib/muldiv64.c
index 79411f5d59..f281578c09 100644
--- a/xen/lib/muldiv64.c
+++ b/xen/lib/muldiv64.c
@@ -13,10 +13,12 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
     union {
         uint64_t ll;
         struct {
-#ifdef WORDS_BIGENDIAN
+#if defined(__BIG_ENDIAN)
             uint32_t high, low;
-#else
+#elif defined(__LITTLE_ENDIAN)
             uint32_t low, high;
+#else
+# error Unknown Endianness
 #endif
         } l;
     } u, res;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.