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

Re: [PULL 04/11] xen-mapcache: Remove 32bit support


  • To: Peter Xu <peterx@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Fri, 18 Sep 2026 14:14:26 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S4ifpLomry5gMeyeT/ahOwYrLfz80Zmfr7qTuPsi0dw=; b=ELBlQOlb4nn3Z4YoS9jpHVgceKSD99SIwEBZ4sxIOxVhYPQcZLWtPtzVM+aZoubxcyUkToLMtZabuAgkxbtmN81VZ+gbPvw3uybf5TcmfsR6+kt4U0MyZaCnAmSxzuOWfUpR6KZpl5R6eV0NMtY6JgqVLnHMcaADjXgrdlH8RZCuuGBho1aDyoXF37hdJW4mws9EK4Xe8tf7Frm/uGtWb5abWw25wvn/uiPPKIJLH3RO+cHqGTolm6ws2zmijc5Ipq/8U055ZJ+ZTgWvLsn1+A5dmRTcmdseCFR2veIwHoG99xotsD6TQo3cmRmTBs3kNmy/uz+GWqq5lfkuPEoDnA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d849NjUXKlFA1XwqhQJo0e4lgI1pF4j7iUBSVjIMiOSFwCa6+yAlpizJoDVs3jfaJ1f3X1pVNDi5Gy4WWaajVLjVv4EGcpm3CTTY3jK7Y/J84hV4/eErIpy49OE7xeTKwVWOA/Xspq/lTFo06uxDAd0V6HIzpM1SHGC+tE9FX6EMlBtxMDLBpYsVpdLHfl3F8Lk7vqaNnbSvHtvrTPPyM7G2KTOPWSQh25BvPbwQHcYiDO8o3tnVTELKQd2MibIwL8RcnHV7CY2ky23EV9hnZSb93FZtcXfqJJPvEyTC1zp3lJRCY+KuXpadJ9mD2/TI/nUUGARyX/sCiNTQ5h++Fw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 18 Sep 2026 13:14:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 9/18/26 12:39 PM, Peter Xu wrote:
QEMU has switched to 64bit-only hosts for all system emulations.

Reviewed-by: Richard Henderson <richard.henderson@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20260818172012.3052821-5-peterx@xxxxxxxxxx
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Anthony PERARD <anthony@xxxxxxxxxxxxxx>
Cc: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
---
  hw/xen/xen-mapcache.c | 12 ++----------
  1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
index 85cf0cf359..e30c07c2ee 100644
--- a/hw/xen/xen-mapcache.c
+++ b/hw/xen/xen-mapcache.c
@@ -26,11 +26,7 @@
  #include <xenevtchn.h>
  #include <xengnttab.h>
-#if HOST_LONG_BITS == 32
-#  define MCACHE_MAX_SIZE     (1UL<<31) /* 2GB Cap */
-#else
-#  define MCACHE_MAX_SIZE     (1UL<<35) /* 32GB Cap */
-#endif
+#define MCACHE_MAX_SIZE     (1UL << 35) /* 32GB Cap */
/* This is the size of the virtual address space reserve to QEMU that will not
   * be use by MapCache.
@@ -151,11 +147,7 @@ void xen_map_cache_init(phys_offset_to_gaddr_t f, void 
*opaque)
          exit(EXIT_FAILURE);
      }
- if (HOST_LONG_BITS == 32) {
-        bucket_shift = 16;
-    } else {
-        bucket_shift = 20;
-    }
+    bucket_shift = 20;
if (geteuid() == 0) {
          rlimit_as.rlim_cur = RLIM_INFINITY;

Using a local variable here to store a constant is a bit weird and its only use
is to be stored as MapCache.bucket_shift and MapCache.bucket_size which are
effectively constant. Not sure why this isn't just a couple of #defines at the
top and used everywhere bucket_shift and bucket_size is needed. Perhaps that is
further cleanup to be done separately...

Ross



 


Rackspace

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