| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
TESTED to boot off a rump based disk
Message-Id: <20220227002655.23300-1-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
The RPC stub will not read it on error anyway.
* rumpdisk/block-rump.c (rumpdisk_device_write, rumpdisk_device_read):
Do not set the number of bytes when returning an error.
|
|
|
|
|
|
|
| |
gcc would complain that dummy_read is unused
* rumpdisk/block-rump.c (rumpdisk_device_write): Mark dummy_read with
attribute unused.
|
|
|
|
|
| |
We have always been using the Linux value, coming from the Linux glue
code.
|
|
|
|
|
|
|
| |
Unaligned accesses need a copy into an aligned buffer.
Accesses larger than a page currently have to be split into pages, otherwise
_bus_dmamap_load_buffer assumes coherent physical allocations.
|
|
|
|
| |
If any device_open succeeds, we should clean its effect.
|
|
|
|
| |
If any device_open succeeds, we should clean its effect.
|
|
|
|
|
| |
Now that the RPCs have const, this forces us cleaning our const-meant
functions.
|
|
|
|
|
| |
This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server
side")
|
|
|
|
|
|
|
|
|
| |
This disables the rump buffer cache and avoids any magic translation that
rump would do.
* rumpdisk/block-rump.c (translate_name): Use `/dev/r%sd' format instead of
`/dev/%sd'.
Message-Id: <20211226113857.150525-4-damien@zamaudio.com>
|
|
|
|
|
|
| |
This ensures memory pages are allocated before written to.
Message-Id: <20211226113857.150525-6-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
This works around a faulty HAVE_REGISTER_T in rump so the rump.h
header can be included without errors.
Message-Id: <20211226113857.150525-2-damien@zamaudio.com>
|
|
|
|
|
|
| |
This reverts commit 517edb7fe7c614a683e18671afc52de8cabe8fdf.
It seems to be actually breaking access to the disk.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (rumpdisk_device_read): Memset the buffer
after allocating it.
|
|
|
|
|
|
|
|
| |
This disables the rump buffer cache and avoids any magic translation that
rump would do.
* rumpdisk/block-rump.c (translate_name): Use `/dev/r%sd' format instead of
`/dev/%sd'.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (rumpdisk_device_read): Use
vm_allocate/vm_deallocate instead of mmap/munmap.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (rumpdisk_device_write): Call vm_deallocate
after writing the data.
|
|
|
|
|
|
|
| |
We do not actually want to shut everything down. For instance, we still have
to be able to start the acpi translator to perform the actual shutdown.
What we however have to do is syncing the disks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libmachdev/machdev-device_emul.h
(struct machdev_device_emulation_ops): Add shutdown method.
* libmachdev/ds_routines.c (machdev_device_shutdown): Take dosync_handle
handle and pass it to shutdown method.
* libmachdev/machdev.h (machdev_device_shutdown): Update prototype.
* libmachdev/trivfs_server.c (S_startup_dosync): Pass shutdown handle to
machdev_device_shutdown call.
* rumpdisk/block-rump.c (rumpdisk_device_shutdown): Take dosync_handle
parameter.
|
|
|
|
|
|
|
|
|
|
| |
This is used by parted to reload the partition table. Since we do not
actually implement partition tables, we can just ignore it.
* rumpdisk/block-rump.c (BLKRRPART): New macro.
(rumpdisk_device_set_status): New function.
(rump_block_emulation_ops): Set device_set_status field to
rumpdisk_device_set_status.
|
|
|
|
|
|
|
| |
to keep coherent with other storeio translators, grub scripts, etc.
* rumpdisk/block-rump.c (translate_name): Prepend /dev/ to disk name.
(is_disk_device): Do not match heading /dev/.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default we do not want rumpdisk to step over the kernel drivers.
* rumpdisk/block-rump.c: Include <device/device.h>.
(disabled): New variable.
(dev_to_port): Rename to rumpdisk_dev_to_port.
(device_init): Rename to rumpdisk_init. Exit if the kernel runs SATA
drivers.
(device_close): Rename to rumpdisk_device_close.
(device_dealloc): Rename to rumpdisk_device_dealloc.
(device_shutdown): Rename to rumpdisk_device_shutdown. Do not shutdown
when disabled.
(device_open): Rename to rumpdisk_device_open. Return D_NO_SUCH_DEVICE
when disabled.
(device_write): Rename to rumpdisk_device_write.
(device_read): Rename to rumpdisk_device_read.
(device_get_status): Rename to rumpdisk_device_get_status.
(rump_block_emulation_ops): Update refs accordingly.
|
|
|
|
|
|
|
|
|
|
| |
* rumpdisk/block-rump.c (struct block_data): Make taken field an integer
instead of a boolean.
(device_open): When search_bd succeeds, set a new reference and return a
new port right. Separate out io_return_t err, int fd, and int ret to avoid
confusions. Simplify the error handling path.
(device_close): Decrement reference and close rump disk only when
reaching zero. Also destroy our port.
|
| |
|
|
|
|
|
|
| |
TESTED by booting a QEMU passthrough disk via rumpdisk.static
Message-Id: <20201109070906.20796-1-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20200801050538.273196-1-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20200725011847.186969-4-damien@zamaudio.com>
|
|
|
|
| |
Otherwise we would crash after an unsuccessful device_open call.
|
|
|
|
| |
There is no need to store the error only to return it.
|
|
|
|
|
| |
* rumpdisk/block-rump.c (device_open): Reduce the dev_name buffer size
by one (unused) byte.
|
|
|
|
|
|
|
| |
To match snprintf parameter order.
* rumpdisk/block-rump.c (translate_name): Make `name' parameter last.
(device_open): Fix translate_name call accordingly.
|
|
|