Il giorno lun 26 ott 2026 alle ore 11:15 Samuel Thibault
<[email protected]> ha scritto:
>
> Hello,
>
> Thanks for having a look at it.
>
> ? Those libraries do not exest at the moment.

I know. Shall I leave them off for the time being or shall I
coordinate with Mike for a naming convention ?

> This is overriding the rules above. You don't need new rules, you just
> need to add the NVME part in the existing rule above.

Patch updated. Hope I got what you meant.

> I don't think we really want to have a different translator for SATA and
> NVMe. For USB the question is different because the USB stack will bring
> complexity and we'll want to manage that differently.
>
> I.e. you'd just add the nvme part in the _RUMP_SATA case.

Same as the last sentence.

> Samuel

diff --git a/rumpdisk/Makefile b/rumpdisk/Makefile
index de33c65d..ccd5f6d3 100644
--- a/rumpdisk/Makefile
+++ b/rumpdisk/Makefile
@@ -1,5 +1,5 @@
 #
-#   Copyright (C) 2019, 2023 Free Software Foundation, Inc.
+#   Copyright (C) 2019, 2023, 2026 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or
 #   modify it under the terms of the GNU General Public License as
@@ -16,7 +16,7 @@
 #   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

 RUMPLIBS=rump rumpuser rumpdev rumpdev_disk rumpdev_pci rumpvfs
-RUMPSATA=rumpdev_ahcisata rumpdev_piixide rumpdev_ata
+RUMPSATA=rumpdev_ahcisata rumpdev_piixide rumpdev_ata rumpdev_nvme rumpdev_ld
 RUMPUSB=rumpdev_usb rumpdev_pci_usbhc rumpdev_umass rumpdev_scsipi
 RUMPEXTRA=rumpdev_scsipi

diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c
index aa4a387f..dff93715 100644
--- a/rumpdisk/block-rump.c
+++ b/rumpdisk/block-rump.c
@@ -1,7 +1,7 @@
 /*
  * Rump block driver support
  *
- * Copyright (C) 2019 Free Software Foundation
+ * Copyright (C) 2019, 2026 Free Software Foundation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -47,10 +47,10 @@
 #define BLKRRPART  0x125F     /* re-read partition table */

 #define DISK_NAME_LEN 32
-#define MAX_DISK_DEV 2
+#define MAX_DISK_DEV 4

 #ifdef _RUMP_SATA
-#define RUMP_TYPE_STRING "rump SATA/IDE"
+#define RUMP_TYPE_STRING "rump SATA/IDE/NVMe"
 #else
 #define RUMP_TYPE_STRING "rump USB"
 #endif
@@ -125,6 +125,7 @@ is_disk_device (const char *name)
   const char *allowed_devs[MAX_DISK_DEV] = {
 #ifdef _RUMP_SATA
     "wd",
+    "ld",
 #else
     "sd",
 #endif
@@ -171,6 +172,19 @@ rumpdisk_device_init (void)
       device_t device;

 #ifdef _RUMP_SATA
+      if (! device_open (device_master, D_READ, "ld0", &device)
+       || ! device_open (device_master, D_READ, "ld1", &device)
+       || ! device_open (device_master, D_READ, "ld2", &device)
+       || ! device_open (device_master, D_READ, "ld3", &device))
+  {
+    device_close (device);
+    mach_port_deallocate (mach_task_self (), device);
+    mach_port_deallocate (mach_task_self (), device_master);
+    fprintf(stderr, "Kernel is already driving a Logic Disk device,
skipping probing disks\n");
+    fflush(stderr);
+    disabled = 1;
+    return;
+  }
 #if 0
       if (! device_open (device_master, D_READ, "hd0", &device)
        || ! device_open (device_master, D_READ, "hd1", &device)

Reply via email to