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

Re: [PATCH] hw/i386/isapc: Remove dead Xen code


  • To: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
  • From: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • Date: Mon, 24 Nov 2025 10:27:14 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.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=wDOtsCwawmr+DgL2zzNQollW8MQljymicxiKFhrkTsM=; b=JadvNieyDsny3oDafPdlBg0TedmQyr+WQjLnKFQwu6LiZhe4WPclYrOyXrVXSTTDBjdw8G7YtI9BPpgmJ3VUhlEKb3d02EfOlxq5/cKPCUSZRRSgQs3t1mnzGmSsRnrBX8IyoJ+yfJ96HNt3t528elx1FkvacT/CVDlDSq5rGjYSh7pgAX80wSw5VCJlKV/tsCBwZgM8/X7kyQ1lqQiooUKrh3eP1i4kEG87E0kgbCSMvlym8utgz2CZtLFpmepi8hltwKBWyxVvIL9lUUSrJcaDOQimYhxMo/WLvfpxsXM7T5uF65R1yuXJx2tnKp4QyEXINYsWIuDgJhq0/bgxaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DsNqL1jUkl0UcwaR7JUWq6y8tWjlE9UTRzOujHrRtFR28PBvLzpJzVXsUJ56nGjsV/JKaeA0zIez7ZMWrPfRdEEc32tVrj2gJcdPqzfvB3IteeiMOqnC3ukVwhAH8FiRm/miNVZMh2sQ3uwk2bmxLeTQDtRqMgLCOeDK0tX9VJXYs0bqC+AkHKN1kE4eB9RqjyZjmfj9x0btBHmjG6QXwZyuk7LObGRW4wCfJ8hB334r7JNykrgvXbYBCNsBrgOsX/Nhi8mkHT7mVQhgaAgmp7nCfOrR99z5ygCniI4IUX8ZpGWH4QqmRmEa3K6xmzH2p7frR2x3to7rTu1d+nvT5g==
  • Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>
  • Delivery-date: Mon, 24 Nov 2025 10:35:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23/11/2025 18:58, Philippe Mathieu-Daudé wrote:

We don't use Xen on the isapc machine: let's remove
pointless code.

Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
  hw/i386/isapc.c | 27 ++++-----------------------
  1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/hw/i386/isapc.c b/hw/i386/isapc.c
index 1ba9ae22cc3..1e13a30c505 100644
--- a/hw/i386/isapc.c
+++ b/hw/i386/isapc.c
@@ -17,8 +17,6 @@
  #include "hw/ide/ide-bus.h"
  #include "system/kvm.h"
  #include "hw/i386/kvm/clock.h"
-#include "hw/xen/xen-x86.h"
-#include "system/xen.h"
  #include "hw/rtc/mc146818rtc.h"
  #include "target/i386/cpu.h"
@@ -37,7 +35,6 @@ static void pc_init_isa(MachineState *machine)
      ISABus *isa_bus;
      uint32_t irq;
      GSIState *gsi_state;
-    MemoryRegion *ram_memory;
      DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
      int i;
@@ -77,15 +74,9 @@ static void pc_init_isa(MachineState *machine)
      /*
       * There is no RAM split for the isapc machine
       */
-    if (xen_enabled()) {
-        xen_hvm_init_pc(pcms, &ram_memory);
-    } else {
-        ram_memory = machine->ram;
-
-        pcms->max_ram_below_4g = 3.5 * GiB;
-        x86ms->above_4g_mem_size = 0;
-        x86ms->below_4g_mem_size = machine->ram_size;
-    }
+    pcms->max_ram_below_4g = 3.5 * GiB;
+    x86ms->above_4g_mem_size = 0;
+    x86ms->below_4g_mem_size = machine->ram_size;
x86_cpus_init(x86ms, pcmc->default_cpu_version); @@ -94,17 +85,7 @@ static void pc_init_isa(MachineState *machine)
      }
/* allocate ram and load rom/bios */
-    if (!xen_enabled()) {
-        pc_memory_init(pcms, system_memory, system_memory, 0);
-    } else {
-        assert(machine->ram_size == x86ms->below_4g_mem_size +
-                                    x86ms->above_4g_mem_size);
-
-        if (machine->kernel_filename != NULL) {
-            /* For xen HVM direct kernel boot, load linux here */
-            xen_load_linux(pcms);
-        }
-    }
+    pc_memory_init(pcms, system_memory, system_memory, 0);
gsi_state = pc_gsi_create(&x86ms->gsi, false);

FWIW I did contact upstream about this (see https://patchew.org/QEMU/20250618112828.235087-1-mark.caveayland@xxxxxxxxxxx/20250618112828.235087-13-mark.caveayland@xxxxxxxxxxx/#91b96b24-af60-4a89-91ec-d0e660a76a0a@xxxxxxxxxxx) and they mentioned that it should work, which is why I left it in.

Unfortunately I don't currently have any way to test it here :/


ATB,

Mark.




 


Rackspace

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