]> xenbits.xensource.com Git - unikraft/unikraft.git/log
unikraft/unikraft.git
18 months agolib/vfscore: Embedded initrd
Simon Kuenzer [Mon, 28 Aug 2023 13:14:54 +0000 (15:14 +0200)]
lib/vfscore: Embedded initrd

This commit introduces the ability to embed a CPIO initrd in a unikernel
image. This can be useful to hard link an initrd content to an
unikernel. An additionally provided initrd can then be used freely with the
fstab function.

Checkpatch-Ignore: AVOID_EXTERNS
Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1070

18 months agolib/vfscore: Support initrds with `LIBVFSCORE_ROOTFS_CUSTOM`
Simon Kuenzer [Mon, 28 Aug 2023 13:12:34 +0000 (15:12 +0200)]
lib/vfscore: Support initrds with `LIBVFSCORE_ROOTFS_CUSTOM`

Commit 24be5b01a7da ("lib/vfscore: Implement individual volume automounting")
disabled the ability to manually specify mounting of an initrd with
`LIBVFSCORE_ROOTFS_CUSTOM`. Initrd support depends on `LIBUKCPIO` and
`LIBRAMFS`. This commit brings back this feature.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1070

18 months agolib/vfscore: Move submenu under `menuconfig`
Simon Kuenzer [Mon, 28 Aug 2023 20:17:26 +0000 (22:17 +0200)]
lib/vfscore: Move submenu under `menuconfig`

This commit moves the library configuration under a menuconfig option for
vfscore. This is done for consistency.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1070

18 months agobuild: Compile dependencies for source files (`*_CDEPS`)
Simon Kuenzer [Mon, 28 Aug 2023 20:20:39 +0000 (22:20 +0200)]
build: Compile dependencies for source files (`*_CDEPS`)

For each source file, additional dependencies that trigger recompilation
can be specified in `Makefile.uk` with `*_CDEPS`:
```
 <LIBNAME>_<SOURCENAME>[_<VARIANT>]_CDEPS   += <dependency>
 <LIBNAME>_<SOURCENAME>[_<VARIANT>]_CDEPS-y += <dependency>
```
Please note that because of the need to remove quotes from filenames,
`qstrip` is called and therefore the CDEPS variable cannot be expanded
with a second expansion (`$$()`).

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1070

18 months agobuild: Restructure common dependencies for buildrule_*
Simon Kuenzer [Mon, 28 Aug 2023 20:19:48 +0000 (22:19 +0200)]
build: Restructure common dependencies for buildrule_*

Restructures the build rules to put common dependencies in a single place.
The advantage is that these dependencies are now automatically applied for
externally defined build rules.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1070

18 months agoplat/virtio: Implement support for event index notification suppression
Marco Schlumpp [Mon, 20 Feb 2023 13:57:00 +0000 (14:57 +0100)]
plat/virtio: Implement support for event index notification suppression

This allows the drivers/device to specify the other side should
send a notification. This is required for firecracker which does not
support the original notification suppression flag.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1089

18 months agoarch/arm64: Support AArch64 binary syscalls
Tianyi Liu [Mon, 31 Jul 2023 05:50:16 +0000 (13:50 +0800)]
arch/arm64: Support AArch64 binary syscalls

An interrupt handler is provided to redirect the interrupts
generated by binary syscalls to the `syscall-shim` layer.

Signed-off-by: Tianyi Liu <i.pear@outlook.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Approved-by: Simon Kuenzer <simon.kuenzer@unikraft.io>
GitHub-Closes: #1009

18 months agoMakefile: Save UK_NAME on savedefconfig
Stefan Jumarea [Fri, 29 Sep 2023 16:13:54 +0000 (19:13 +0300)]
Makefile: Save UK_NAME on savedefconfig

Using `make savedefconfig` did not save the `UK_NAME` config option.
Fix that by appending the value by hand at the end of the `DEFCONFIG`
file.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #762
Approved-by: Simon Kuenzer <simon.kuenzer@unikraft.io>
Reviewed-by: Simon Kuenzer <simon.kuenzer@unikraft.io>
GitHub-Closes: #1118

18 months agoplat/common/arm: Check for offline GICC during ACPI MP enumeration
Sergiu Moga [Sat, 23 Sep 2023 12:21:30 +0000 (15:21 +0300)]
plat/common/arm: Check for offline GICC during ACPI MP enumeration

When we probe for available, valid GICC's, we only look for those
that are already online and initialized, totally forgetting about
those that are usable but offline. Therefore, check for powered off
GICC's as well, since, during probe, we re-initialize GICC's anyway.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1120

18 months agoplat/common/acpi: Fix `VGIC IRQ MODE` flag bitfield of `GICC`
Sergiu Moga [Sat, 23 Sep 2023 11:58:13 +0000 (14:58 +0300)]
plat/common/acpi: Fix `VGIC IRQ MODE` flag bitfield of `GICC`

The bitfield `ACPI_MADT_GICC_FLAGS_VGIC_IRQ_MODE` of `GICC` had
the wrong value: it may be the 3rd bit from right to left, but its
corresponding value is 4 (1 << 2) not 3.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1120

18 months agolib/9pfs: Remove unused warnings
Michalis Pappas [Wed, 27 Sep 2023 10:35:49 +0000 (12:35 +0200)]
lib/9pfs: Remove unused warnings

Add `__unused` attribute to uk_9pfs_ioctl parameters to silence GCC
warning.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agolib/vfscore: Remove unused warnings
Michalis Pappas [Mon, 25 Sep 2023 14:11:09 +0000 (16:11 +0200)]
lib/vfscore: Remove unused warnings

When building without assertions some arguments and variables
are not used. This commit adds respective attributes to solve
the warning.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agolib/ukblkdev: Remove unused warnings
Michalis Pappas [Mon, 25 Sep 2023 14:10:33 +0000 (16:10 +0200)]
lib/ukblkdev: Remove unused warnings

When building without assertions some arguments and variables
are not used. This commit adds respective attributes to solve
the warning.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/blk: Remove unused warnings
Michalis Pappas [Mon, 25 Sep 2023 14:09:19 +0000 (16:09 +0200)]
drivers/virtio/blk: Remove unused warnings

When building without assertions some arguments and variables
are not used. This commit adds respective attributes to solve
the warning.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio: Fix unhandled IRQ
Marc Rittinghaus [Tue, 15 Feb 2022 16:37:51 +0000 (17:37 +0100)]
drivers/virtio: Fix unhandled IRQ

It may happen that depending on timing there is no new data in the
virtio queue, however, an IRQ is still pending. When this pending IRQ
is handled, the driver reports back that it did not handle the request
although in fact resetting the IRQ signal bit in the virtio device is
enough to acknowlegde that an interrupt for the device has been
received and handled (albeit without having to do any additional
work). This will lead to a false Unhandled IRQ error message on
the console. This commit is a first dirty hack to just always
acknowledge IRQs if the status bit is set, thereby avoiding the
error message.

Checkpatch-Ignore: LONG_LINE
Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodriver/virtio/mmio: Make config_get return value consistent with PCI
Michalis Pappas [Mon, 25 Sep 2023 14:57:02 +0000 (16:57 +0200)]
driver/virtio/mmio: Make config_get return value consistent with PCI

Update the return value of virtio-mmio ops->config_get to return zero
on success rather like the number of bytes read, to align with virtio-pci.
This allows consistent error handling from device driver side.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/blk: Downgrade empty queue message
Michalis Pappas [Mon, 25 Sep 2023 14:27:16 +0000 (16:27 +0200)]
drivers/virtio/blk: Downgrade empty queue message

Due to virtio using separate data and control paths, it is normal for
the queue to be observed as empty if the interrupt arrives before the
write can be observed by the driver. Downgrade the severity of the log
message to `debug`.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/blk: Add basic support for modern virtio
Michalis Pappas [Mon, 25 Sep 2023 14:22:15 +0000 (16:22 +0200)]
drivers/virtio/blk: Add basic support for modern virtio

This commit adds the minimum set of changes required for modern virtio
support.

Checkpatch-Ignore: LONG_LINE
Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/net: Add basic support for modern virtio
Michalis Pappas [Wed, 20 Sep 2023 16:19:31 +0000 (18:19 +0200)]
drivers/virtio/net: Add basic support for modern virtio

This commit adds the minimum set of changes required for modern virtio
support.

Checkpatch-Ignore: LONG_LINE
Signed-off-by: Andrei Tudor Topală <topala.andrei@gmail.com>
Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/bus: Add basic support for modern virtio
Michalis Pappas [Wed, 20 Sep 2023 16:17:44 +0000 (18:17 +0200)]
drivers/virtio/bus: Add basic support for modern virtio

This commit adds the minimum set of changes required for modern virtio
support.

Signed-off-by: Andrei Tudor Topală <topala.andrei@gmail.com>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/ring: Add basic support for modern virtio
Michalis Pappas [Wed, 20 Sep 2023 16:24:47 +0000 (18:24 +0200)]
drivers/virtio/ring: Add basic support for modern virtio

This commit adds the minimum set of changes required for modern virtio
support.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio/mmio: Add basic support for modern virtio
Michalis Pappas [Tue, 26 Sep 2023 15:45:07 +0000 (17:45 +0200)]
drivers/virtio/mmio: Add basic support for modern virtio

This commit adds the minimum set of changes required for modern virtio
support.

Signed-off-by: Andrei Tudor Topală <topala.andrei@gmail.com>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio: Add definition of VIRTIO_CONFIG_STATUS_FEATURES_OK
Michalis Pappas [Tue, 26 Sep 2023 15:35:05 +0000 (17:35 +0200)]
drivers/virtio: Add definition of VIRTIO_CONFIG_STATUS_FEATURES_OK

Add definition of VIRTIO_CONFIG_STATUS_FEATURES_OK in anticipation of
support for modern virtio.

Signed-off-by: Andrei Tudor Topală <topala.andrei@gmail.com>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio: Add config space access over MMIO for x86_64
Michalis Pappas [Tue, 26 Sep 2023 15:31:47 +0000 (17:31 +0200)]
drivers/virtio: Add config space access over MMIO for x86_64

Add config space access primitives over MMIO for x86_64. On
arm64 these are aliased to the existing memory-based ops.

Update the config space access API with MMIO ops for valid
access widths.

Checkpatch-Ignore: LONG_LINE
Signed-off-by: Andrei Tudor Topală <topala.andrei@gmail.com>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio: Update coding style of virtio_config.h
Michalis Pappas [Tue, 26 Sep 2023 15:18:39 +0000 (17:18 +0200)]
drivers/virtio: Update coding style of virtio_config.h

Checkpatch and other fixes to comply to coding conventions

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agoplat/common/x86: Add API for x86_64 MMIO operations
Michalis Pappas [Wed, 20 Sep 2023 15:31:20 +0000 (17:31 +0200)]
plat/common/x86: Add API for x86_64 MMIO operations

Until now the x86_64 API has only been providing port-based
access to the device's config space. Add implementation for
MMIO access.

Signed-off-by: Andrei Tudor Topală <topala.andrei@gmail.com>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agodrivers/virtio: Remove redundant parameter from ops->features_set()
Michalis Pappas [Wed, 20 Sep 2023 15:24:13 +0000 (17:24 +0200)]
drivers/virtio: Remove redundant parameter from ops->features_set()

Remove the `features` parameter from ops->features_set() as the vdev
parameter already provides access to the features.

Update `vdev->features` with the features supported by virtio-ring.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

18 months agoplat: Increase debug messages of the memregion coalescing function
Sergiu Moga [Fri, 6 Oct 2023 09:27:04 +0000 (12:27 +0300)]
plat: Increase debug messages of the memregion coalescing function

Add more debugging messages to `ukplat_memregion_list_coalesce` to help
in finding inconsistencies as well as misbehaving memory region maps.

Furthermore, replace returns of error codes with `UK_ASSERT` and, thus,
change `ukplat_memregion_list_coalesce`'s signature to return nothing
as well as its callers' site accordingly.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agoplat/common/memory: Add memregion descriptor print function
Sergiu Moga [Fri, 6 Oct 2023 09:25:47 +0000 (12:25 +0300)]
plat/common/memory: Add memregion descriptor print function

Implement a basic printing function for memory regions.
`ukplat_memregion_print_desc`'s implementation will be conditioned
by whether `CONFIG_LIBUKDEBUG_PRINTD` is enabled or not.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agosupport/scripts: Ignore memory regions of length 0 in mkbootinfo.py
Sergiu Moga [Thu, 28 Sep 2023 16:10:39 +0000 (19:10 +0300)]
support/scripts: Ignore memory regions of length 0 in mkbootinfo.py

To avoid having the memory region map polluted with descriptors of
length 0, make sure that they are not inserted by `mkbootinfo.py`
either.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agoplat/common: Do not insert left region empty leftover on overlap
Sergiu Moga [Thu, 28 Sep 2023 15:26:28 +0000 (18:26 +0300)]
plat/common: Do not insert left region empty leftover on overlap

Consider the following case:
|-----------|----------|---------------|
|           |          |               |
|-----------|----------|---------------|
ML start    MR start   MR end          ML end

In the current state, we insert the (ML end - MR end) region regardless
of its length. If it is equal to 0, we end up inserting an empty memory
region. Thus, do not do this insertion if (ML end - MR end) == 0.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agoplat/common/memory: Return `-EINVAL` on insertion of empty memregions
Sergiu Moga [Sat, 23 Sep 2023 08:23:55 +0000 (11:23 +0300)]
plat/common/memory: Return `-EINVAL` on insertion of empty memregions

Since insertion of empty memory regions should not happen, return
`-EINVAL` in case the program does somehow end up doing this.

This way we will know early on if a memregion computation is wrong
or if we are met with an unhandled edge case.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agoplat/common: Error out if free regions not aligned for paging init
Sergiu Moga [Sat, 19 Aug 2023 15:56:01 +0000 (18:56 +0300)]
plat/common: Error out if free regions not aligned for paging init

If the early code did everything right when setting up the memory
regions, then no free memory region should be misaligned by this
point. Otherwise, something bad happened so throw an exception.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agolib/ukboot: Ensure page-aligned mem regions are added to allocator
Sergiu Moga [Sat, 19 Aug 2023 10:35:23 +0000 (13:35 +0300)]
lib/ukboot: Ensure page-aligned mem regions are added to allocator

If paging is disabled, ensure compatibility with memory allocators
such as TLSF, by only adding page-aligned free memory regions to the
memory allocator pools. Throw an exception otherwise.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agoplat: Make memory region coalescing function handle misalignments
Sergiu Moga [Mon, 21 Aug 2023 07:28:49 +0000 (10:28 +0300)]
plat: Make memory region coalescing function handle misalignments

In order to preserve alignment among memory region descriptors, we
would strive to align every inserted memory region. However, this
would also rely on the boot protocol itself to report initial aligned
memory regions, which seems not be the case for some boot protocols
(e.g. cmdline may not be aligned in `Multiboot1`, `initrd` start
address may not be aligned in Linux Boot Protocol).

Therefore, write a single, centralized solution, inside the memory
region coalescing function and make it handle misalignment cases
as well to cope with misbehaving boot protocols. To guarantee
alignment, take each memory region, align it to both ends and
then resolve overlappings. Just like before, free memory regions
are trimmed in favor of other types of memory regions. We know
free memory regions will always be aligned because resolving
conflicts between aligned memory region descriptors will always
yield aligned memory regions.

To preserve original sizes of user allocated memory region descriptors,
in case a deletion is not detected, restore the start address and
length of such region and make sure that the `vbase` field stays updated
with new values of `pbase`.

Finally, now that we offload alignments to the newly improved coalescing
method, remove manual, hardcoded alignments from early boot glue code.
If everything goes as planned and is implemented in a manner where
expectations are met, these alignments should not be needed as they
are transparently ensured by the coalescing method as well as the
paging initialization.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agoplat/common: Preserve original size of allocated memory regions
Sergiu Moga [Sat, 19 Aug 2023 15:33:34 +0000 (18:33 +0300)]
plat/common: Preserve original size of allocated memory regions

Previously, `ukplat_memregion_alloc()` would allow one to dynamically
allocate based on available free memory regions a certain memory region
of a specific type and with specific flags and whose size will be the
page-aligned size of the desired size.

A user may want however to fetch some memory regions and know the
actual, intended size. To achieve this, make it so that the allocated
memory region has the original size on the surface, but the actual
allocation is done by splitting a page-aligned chunk to avoid
misalignments.

This leads to the same amount of memory fragmentation as before,
but with the improvement that the user of the API will have access to
the actual size of the data the memory region was allocated for.

Luckily, the paging initialization code is written in such a way that
it aligns every memory region before mapping/unmapping.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1060

18 months agosupport/scripts: Use elf64_to_32.py for the multiboot header
Sergiu Moga [Thu, 31 Aug 2023 18:29:48 +0000 (21:29 +0300)]
support/scripts: Use elf64_to_32.py for the multiboot header

Since `multiboot` demands that its corresponding header be placed in the
first 8192 bytes and `GRUB` for whatever reason adds another restriction
requesting that the ELF Program Headers also have to be found in this
range (see GRUB commit 9a5c1ad), offload the effort of building the
Multiboot header from the GAS directive defined header of `multiboot.S`
to `elf64_to_32.py`.

This will offer us more flexiblity and relieve us of the effort of
having anything ELF32 related inside the core codebase.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1079

18 months agosupport/scripts: Rename `elf64_to_32.py` to `multiboot.py`
Sergiu Moga [Thu, 31 Aug 2023 18:29:48 +0000 (21:29 +0300)]
support/scripts: Rename `elf64_to_32.py` to `multiboot.py`

Now that we use `elf64_to_32.py` for building the `multiboot` header as
well and `elf64_to_32.py` is only used for `multiboot` builds, rename
the script accordingly, to reflect the fact the sole reason this script
exists is to cope with the demands of this ancient boot protocol.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Marco Schlumpp <marco@unikraft.io>
GitHub-Closes: #1079

18 months agolib/9pfs: Return ENOTTY on terminal ioctl calls
Stefan Jumarea [Wed, 20 Sep 2023 20:32:10 +0000 (23:32 +0300)]
lib/9pfs: Return ENOTTY on terminal ioctl calls

Some applications (e.g. python) will use `ioctl()` calls to check if an
interactive interpretor should be started or if a file should be read.

`9pfs` should respond to all terminal-related calls with an `ENOTTY`
error, so applications know that they are not running in an interactive
environment.

In order to detect the ioctl request type, add a new macro,
`IOCTL_CMD_ISTYPE(cmd, type)`, which will check the corresponding bytes
from the request number (an enhanced version of the Linux `_IOC_TYPE`).

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
GitHub-Closes: #1098

18 months agolib/9pfs: Return ENOTSUP on ioctl requests
Stefan Jumarea [Fri, 15 Sep 2023 20:02:51 +0000 (23:02 +0300)]
lib/9pfs: Return ENOTSUP on ioctl requests

Currently `9pfs` returns 0 for any `ioctl` request (except for
`TIOCGWINSZ`), which leads to multiple cases of files being interpreted
as terminals. You can see this problem when running python scripts,
since python uses `ioctl` calls to check if it should open up the
interactive interpretor or execute a script.

Same thing could happen for other applications that rely on `ioctl`
operations being properly executed, so the best way to go would be
return `ENOTSUP` (as is used to happen before commit 28d0edf).

If the `ioctl` call always return `ENOTSUP`, the Ruby binary
compatibility application will fail, since it tries to set O_ASYNC and
breaks on error, even if it does not directly depends on that, so for
now add a special case for that.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
GitHub-Closes: #1098

18 months agoMakefile: Fix build verbosity for V=0
Stefan Jumarea [Tue, 22 Aug 2023 17:35:16 +0000 (20:35 +0300)]
Makefile: Fix build verbosity for V=0

When setting `V=0`, we expect the verbosity level to be reduced, and
only the build output to be printed, not the build commands.
Set `Q = @` by default, in case `V != 0` is set, set `Q` appropriately.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Fixes: #676
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Robert Kuban <robert.kuban@opensynergy.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1066

18 months agodriver/ukbus: Fix an invalid check in PCI probe
Kha Dinh [Sun, 24 Sep 2023 13:39:43 +0000 (13:39 +0000)]
driver/ukbus: Fix an invalid check in PCI probe

This causes the PCI driver to not initialize on certain systems.
The check should uses `==` instead.

Signed-off-by: Kha Dinh <khadinh@g.skku.edu>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #1110

18 months agoplat/common/x86: Make SIPI vector relocs independent from `ukreloc`
Sergiu Moga [Fri, 29 Sep 2023 14:26:01 +0000 (17:26 +0300)]
plat/common/x86: Make SIPI vector relocs independent from `ukreloc`

Allow having the same relocation mechanism of the SIPI vector symbols
be used regardless of whether `ukreloc` or `PIE` are enabled or not.

With this commit, SMP initialization has now the same SIPI behavior
regardless of `ukreloc`/`PIE`, thus dropping any conflicts/dependencies.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1113

18 months agoplat/common/x86: Separate `start16` relocations from `ukreloc`
Sergiu Moga [Fri, 29 Sep 2023 13:42:36 +0000 (16:42 +0300)]
plat/common/x86: Separate `start16` relocations from `ukreloc`

Since `start16` related symbols have a relocation mechanism similar,
but entirely independent from `ukreloc`, rename all such symbols,
macro's and their uses so that they do not contain the `uk_reloc` or
the `UKRELOC` substrings.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1113

18 months agoplat/virtio: Use may_alias attribute for vring_avail_event
Marco Schlumpp [Mon, 19 Jun 2023 07:46:18 +0000 (09:46 +0200)]
plat/virtio: Use may_alias attribute for vring_avail_event

The macro violates the strict aliasing rules. By using the newly introduced
may_alias attribute we can prevent miscompilations because of that.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Rares Miculescu <miculescur@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GiHub-Closes: #1076

18 months agoinclude/uk: Introduce macro for may_alias attribute
Marco Schlumpp [Wed, 26 Apr 2023 15:14:33 +0000 (17:14 +0200)]
include/uk: Introduce macro for may_alias attribute

This attribute allows to opt-out of the standard C strict aliasing rule.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Rares Miculescu <miculescur@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GiHub-Closes: #1076

18 months agoplat/virtio: Use correct type for vring_avail_event field
Marco Schlumpp [Wed, 30 Aug 2023 15:16:38 +0000 (17:16 +0200)]
plat/virtio: Use correct type for vring_avail_event field

This code was imported and this occurrence of the type was not adjusted when
the type name changed.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Rares Miculescu <miculescur@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GiHub-Closes: #1076

18 months agosupport/scripts: `checkpatch` `WARN` on commit subject > 70 chars
Sergiu Moga [Wed, 30 Aug 2023 17:54:07 +0000 (20:54 +0300)]
support/scripts: `checkpatch` `WARN` on commit subject > 70 chars

Although `checkpatch.pl` checks for commit message lines to not be
longer than `75` characters, in the case of `Github`'s UI, a commit
subject longer than `70` character results in its line overflowing
into the next.
E.g.
```
[Selector]/[Component]: Lorem ipsum dolor sit amet, consectetuer adipiscin
```
becomes
```
[Selector]/[Component]: Lorem ipsum dolor sit amet, consectetuer adip...
...iscin
```

Since this is not aesthetically pleasing, enforce a character limit for
commit message subjects to not be longer than `70` characters.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1077

18 months agolib/uklock: Remove the rwlock_{upgrade,downgrade} functions
Marco Schlumpp [Tue, 12 Sep 2023 11:21:01 +0000 (13:21 +0200)]
lib/uklock: Remove the rwlock_{upgrade,downgrade} functions

In the current form they impose very strong synchronization requirements,
making it impossible to implement a more efficient read-write lock design.

Most rwlocks sidestep this by either using a weaker `try_upgrade` variant
or having a separate `lock_upgradable` function (allowing multiple readers
but only one upgradable lock/writer lock).

This removes these two functions for now to prevent new code relying on
these functions. This change is breaking because it already was part of the
previous release.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1090

18 months agolib/uknetdev: Add interface for IPv4/TCP segmentation offload
Marco Schlumpp [Wed, 8 Mar 2023 13:02:56 +0000 (14:02 +0100)]
lib/uknetdev: Add interface for IPv4/TCP segmentation offload

This allows network device to advertise support for TSO on IPv4 and
clients to send large packets that are split by the hardware.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1088

18 months agolib/uknetdev: Add header for basic network structures
Marco Schlumpp [Wed, 8 Mar 2023 13:02:56 +0000 (14:02 +0100)]
lib/uknetdev: Add header for basic network structures

These structures allow introspection of network packets for drivers.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1088

18 months agodrivers/virtio: Add support for IPv4/TSO
Marco Schlumpp [Wed, 8 Mar 2023 13:02:56 +0000 (14:02 +0100)]
drivers/virtio: Add support for IPv4/TSO

When the host indicates support for TSO, enable it and accept large
packets when the corresponding uknetbuf flag is set.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1088

18 months agoarch/*: Add an non-aligned version for stack-pushing
Tianyi Liu [Fri, 15 Sep 2023 18:02:41 +0000 (02:02 +0800)]
arch/*: Add an non-aligned version for stack-pushing

For AArch64, `ukarch_rctx_stackpush` may add padding to make sure
the `sp` register is aligned to 16 bytes. But there're also some
use cases where alignment is not allowed. In such cases, the newly
added `ukarch_rctx_stackpush_packed` and `ukarch_rstack_push_packed`
will be useful.

Signed-off-by: Tianyi Liu <i.pear@outlook.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1096

18 months agolib/vfscore: Fix pipe error codes
Andrei Tatar [Thu, 14 Sep 2023 08:58:45 +0000 (11:58 +0300)]
lib/vfscore: Fix pipe error codes

This change fixes incorrect return of error codes in the pipe module of
vfscore. Specifically:
- Return positive error codes from internal functions; syscall handlers
  expect positive errors and will negate them as required
- Do not set errno, rather return the error code
- Correctly return EINVAL when attempting to open a pipe with O_DIRECT,
  as we do not support packet mode pipes, and calling code needs to be
  made aware of this

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1093

18 months agolib/vfscore: Remove timeval-related build warnings
Tiago Andre Goncalves Oliveira [Sat, 16 Sep 2023 17:02:38 +0000 (18:02 +0100)]
lib/vfscore: Remove timeval-related build warnings

The futimes and lutimes functions are defined with a `struct timeval [2]`
argument. They are however instantiated with a pointer. This causes a build
warning.

Change the instantiation from pointer to array. This removes the build warning.

Signed-off-by: Tiago Andre Goncalves Oliveira <t.g.oliveira@ua.pt>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1099

18 months agolib/ramfs: Fix UAF bug when deleting open file
Andrei Tatar [Mon, 28 Aug 2023 19:31:17 +0000 (21:31 +0200)]
lib/ramfs: Fix UAF bug when deleting open file

Previously ramfs would eagerly free filesystem nodes when deleting a
file regardless whether the file is open, leading to a possible
use-after-free bug if the open file is later used.
This change fixes this issue by marking nodes as deleted after they have
been removed from the filesystem, then only releasing resources lazily
once all open references have been garbage-collected.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Delia Pavel <delia_maria.pavel@stud.acs.upb.ro>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
GitHub-Closes: #1075

18 months agolib/vfscore: Fix potential vfscore_file mem leak
Andrei Tatar [Mon, 28 Aug 2023 19:13:49 +0000 (21:13 +0200)]
lib/vfscore: Fix potential vfscore_file mem leak

Previously if `fdalloc` failed to allocate a file descriptor, the
function would exit without decrementing the reference count on the
vfscore_file object, leading to a potential memory leak.
This change reorders operations to prevent this scenario.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Delia Pavel <delia_maria.pavel@stud.acs.upb.ro>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1074

18 months agobuild: Always save architecture with savedefconfig
Simon Kuenzer [Fri, 8 Sep 2023 17:37:46 +0000 (19:37 +0200)]
build: Always save architecture with savedefconfig

With `savedefconfig`, KConfig creates a file that contains only options
that are different from the default selection. Because the build system
automatically detects the host architecture and sets the default
architecture to this detected architecture, the architecture is never
part of the defconfig file if the architecture in the configuration
matches the host architecture. This becomes problematic as soon as such
a file is loaded on a build environment that has a different host
architecture: The configuration can fail because of architectural
configuration differences.

This commit ensures that the configured architecture is always stored
in the defconfig file. The `savedefconfig` target appends the configured
architecture to the file if the architectures between host and config
match.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikrat.io>
GitHub-Closes: #1084

18 months agobuild: Forward host architecture from build system to KConfig
Simon Kuenzer [Fri, 8 Sep 2023 21:30:11 +0000 (23:30 +0200)]
build: Forward host architecture from build system to KConfig

Commit c11dceaa9698 ("kconfig: Determine the default arch from CC")
introduced the automatic selection of a default target architecture by
querying and parsing the default compiler's target machine. Because the
detection breaks across GCC output versions, this commit forwards the host
architecture already detected by the main Makefile to the KConfig
system. This way, KConfig will be in sync with what the Makefile system has
detected.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikrat.io>
GitHub-Closes: #1084

18 months agobuild: Do not check for updates with `savedefconfig`
Simon Kuenzer [Fri, 8 Sep 2023 17:37:18 +0000 (19:37 +0200)]
build: Do not check for updates with `savedefconfig`

The `savedefconfig` target is not saving a new configuration (`.config`)
but it derives a minimal configuration from the current
configuration. Because of this, it is not necessary to check for
updates to the configuration.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikrat.io>
GitHub-Closes: #1084

18 months agolib/ukcpio: Preserve timestamp of extracted files
Andrei Tatar [Wed, 16 Aug 2023 15:10:50 +0000 (17:10 +0200)]
lib/ukcpio: Preserve timestamp of extracted files

Previously ukcpio did not honor the `mtime` field of cpio sections,
leaving extracted files timestamped with the extraction time.
This change implements setting the timestamps for regular files.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Adina-Maria Vaman <adinamariav22@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikrat.io>
GitHub-Closes: #1071

18 months agolib/ukcpio: Remove use of malloc & free
Andrei Tatar [Wed, 16 Aug 2023 14:24:50 +0000 (16:24 +0200)]
lib/ukcpio: Remove use of malloc & free

This change removes the use of heap memory for computing the extraction
path, eliminating a call to malloc & free for every cpio section,
leaving ukcpio to use only stack memory.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Adina-Maria Vaman <adinamariav22@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikrat.io>
GitHub-Closes: #1071

18 months agolib/ukcpio: Replace file libcalls with syscalls
Andrei Tatar [Wed, 16 Aug 2023 14:01:36 +0000 (16:01 +0200)]
lib/ukcpio: Replace file libcalls with syscalls

This change replaces calls to open, close, write, chmod, and mkdir with
their raw Unikraft syscall equivalents, preventing a call into
potentially non-unikraft code, as well as eliminating the use of errno.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Adina-Maria Vaman <adinamariav22@gmail.com>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikrat.io>
GitHub-Closes: #1071

18 months agolib/posix-user: Allow custom user & group
Andrei Tatar [Mon, 28 Aug 2023 19:11:08 +0000 (21:11 +0200)]
lib/posix-user: Allow custom user & group

This change adds Kconfig options to select the default UID, GID,
username, and groupname that Unikraft reports to applications.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Ioan-Teodor Teugea <ioan_teodor.teugea@stud.acs.upb.ro>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1072

18 months agolib/ukmmap: Fix wrong return of NULL
Andrei Tatar [Mon, 28 Aug 2023 19:25:05 +0000 (21:25 +0200)]
lib/ukmmap: Fix wrong return of NULL

Previously ukmmap's `mmap()` would return NULL for unimplemented cases.
However, no calling code expects this, and will wrongly try to use the
returned buffer.
This change corrects this oversight and returns MAP_FAILED in all cases
of error.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Delia Pavel <delia_maria.pavel@stud.acs.upb.ro>
Reviewed-by: Andra Paraschiv <andra@unikraft.org>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1073

18 months agodrivers/virtio: Add UK_PLAT_COMMON_BASE to the include path
Michalis Pappas [Mon, 18 Sep 2023 14:25:35 +0000 (16:25 +0200)]
drivers/virtio: Add UK_PLAT_COMMON_BASE to the include path

The virtio drivers have both direct and indirect dependencies
on `uk/plat/common` headers.

Add UK_PLAT_COMMON_BASE to the library include path of every
driver library to fix compile errors.

Also add LIBUKVIRTIO_BUS_BASE to the include path of virtio-ring
as it includes `virtio/virtio_bus.h`.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1095

18 months agodrivers/ukbus/pci: Add UK_PLAT_COMMON_BASE to the include path
Michalis Pappas [Mon, 18 Sep 2023 14:25:35 +0000 (16:25 +0200)]
drivers/ukbus/pci: Add UK_PLAT_COMMON_BASE to the include path

The pci driver has various dependencies on headers in `uk/plat/common`.
Add UK_PLAT_COMMON_BASE to the library include path.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1095

18 months agodrivers/ukbus/platform: Add UK_PLAT_COMMON_BASE to the include path
Michalis Pappas [Mon, 18 Sep 2023 14:25:35 +0000 (16:25 +0200)]
drivers/ukbus/platform: Add UK_PLAT_COMMON_BASE to the include path

The platform bus driver depeds on `uk/plat/common/cpu.h`. Add
UK_PLAT_COMMON_BASE to the library include path.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1095

19 months agoscripts: `mkukimg`: Run only on Linux
Simon Kuenzer [Fri, 22 Sep 2023 15:01:12 +0000 (17:01 +0200)]
scripts: `mkukimg`: Run only on Linux

The script `mkukimg` can only be run on a Linux host. This commit adds a
check that stops execution if the detected host environment is not Linux.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Jakub Ciolek <jakub.ciolek@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1109

 enter the commit message for your changes. Lines starting

19 months agoscripts: Use GNU version of coreutils on Darwin
Simon Kuenzer [Fri, 22 Sep 2023 14:52:39 +0000 (16:52 +0200)]
scripts: Use GNU version of coreutils on Darwin

This commit changes the scripts under `support/scripts` and
`support/build` so that they use the GNU versions of the following
commands on Darwin:
```
 readlink, dirname, grep
```
As soon as Darwin is detected as host environment, the scripts use
the following commands instead:
```
 greadlink, gdirname, ggrep
```
These tools are typically installed with HomeBrew
(`brew install coreutils`).

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Jakub Ciolek <jakub.ciolek@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1109

19 months agobuild: Provide command variables for `readlink` and `dirname`
Simon Kuenzer [Fri, 22 Sep 2023 20:13:56 +0000 (22:13 +0200)]
build: Provide command variables for `readlink` and `dirname`

For future references this commit adds command variables for `readlink`
and `dirname`. On Darwin these variables point to the GNU versions of
the commands. They are typically installed with HomeBrew
(`brew install coreutils`) and prefixed with a `g`:
`greadlink`, `gdirename`.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Jakub Ciolek <jakub.ciolek@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1109

19 months agobuild: Use ggrep on Darwin (MacOS)
Simon Kuenzer [Fri, 22 Sep 2023 15:00:17 +0000 (17:00 +0200)]
build: Use ggrep on Darwin (MacOS)

The build system depends on the GNU version of `grep`. Since this is
typically installed with `ggrep` on Darwin environments with HomeBrew
(`brew install coreutils`), we call `ggrep` in such a case.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Jakub Ciolek <jakub.ciolek@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1109

19 months agosupport/scripts: mkcpio: Support Darwin (MacOS) environments
Simon Kuenzer [Wed, 30 Aug 2023 21:38:19 +0000 (23:38 +0200)]
support/scripts: mkcpio: Support Darwin (MacOS) environments

The standard `cpio` tool available under Darwin is the equivalent of the
`bsdcpio` tool available under Linux. At the beginning of the script we
detect the host environment and use `bsdcpio` or `cpio` accordingly.

Signed-off-by: Simon Kuenzer <simon@unikraft.io>
Reviewed-by: Eduard-Florin Mihailescu <mihailescu.eduard@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1078

19 months agobuild: Add target to print unikernel LoC stats
Andrei Tatar [Fri, 15 Sep 2023 12:52:19 +0000 (14:52 +0200)]
build: Add target to print unikernel LoC stats

This change adds the `print-loc` Makefile target which (fairly hackishly)
computes and prints statistics about the number of lines of code that
make it into a built unikernel image. It is not intended as an end-user
metric and thus does not aim for any particular level of accuracy or
edge-case handling, rather it is a fun little dev tool that allows
rough comparisons of the level of "bloat" between unikernels.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1108

19 months agobuild: Forward YACC/LEX to kconfig make invocation
Marco Schlumpp [Wed, 13 Sep 2023 09:34:17 +0000 (11:34 +0200)]
build: Forward YACC/LEX to kconfig make invocation

KConfig relies on GNU bison and does not work with the classical yacc.
While most Linux distributions prefer bison and add a symlink for yacc,
there are distributions that do not this (Fedora). They seem to actually
use the original Berkeley yacc to provide `yacc`.

Instead of using the default `yacc` for `YACC` in make explicitly forward
our preference for `bison` to the kconfig Makefile.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1092

19 months agolib/vfscore: Replace dup2 syscalls with dup3
Andrei Tatar [Tue, 22 Aug 2023 13:43:05 +0000 (15:43 +0200)]
lib/vfscore: Replace dup2 syscalls with dup3

vfscore contained internal calls to the dup2 syscall, which is not
universally provided on all architectures, notably absent on AArch64.
This change replaces calls to dup2 with dup3 which is more universal.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Ioan-Teodor Teugea <ioan_teodor.teugea@stud.acs.upb.ro>
Reviewed-by: Andra Paraschiv <andra@unikraft.org>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1069

19 months agolib/nolibc: Add `__errno_location` implementation
Eduard Mihailescu [Fri, 11 Aug 2023 11:28:37 +0000 (14:28 +0300)]
lib/nolibc: Add `__errno_location` implementation

At link time, objects such as the ones derived from `gcov` which comes
with `gcc-13` require this symbol in order to build.

Signed-off-by: Eduard-Florin Mihailescu <mihailescu.eduard@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1044

19 months agolib: Remove dirent64-related build warnings
Tiago Andre Goncalves Oliveira [Sat, 16 Sep 2023 10:57:03 +0000 (11:57 +0100)]
lib: Remove dirent64-related build warnings

Using Musl and the dirent64 structure causes build warnings. This is
because certain source code files do not define _GNU_SOURCE. Fix build
warnings by defining _GNU_SOURCE in the required source code files.

Signed-off-by: Tiago Andre Goncalves Oliveira <t.g.oliveira@ua.pt>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1097

19 months agoplat/kvm: Fix typo in configuration variable
Robert Kuban [Tue, 5 Sep 2023 16:42:44 +0000 (18:42 +0200)]
plat/kvm: Fix typo in configuration variable

Remove a redundant `KVM_` in order to reference `KVM_KERNEL_SERIAL_CONSOLE`
when deciding if a serial console driver needs to be chosen.

Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1081

19 months agoMakefile: Fix support for external platforms
Robert Kuban [Tue, 5 Sep 2023 14:39:58 +0000 (16:39 +0200)]
Makefile: Fix support for external platforms

Set `KCONFIG_EPLAT_DIRS` to the list of external platforms `$(P)` instead
of `$(E)`, which is not defined in this context.

With the change, the `config-submenu.sh` script will pickup the `Config.uk`
of an external platform as expected.

Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1082

19 months agolib/ukofw: Fix configuration dependencies
Rares Miculescu [Sat, 9 Sep 2023 22:15:25 +0000 (01:15 +0300)]
lib/ukofw: Fix configuration dependencies

Replace `depends on` with `select` for `LIBFDT` to allow
chained dependency resolution.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agodrivers/ukbus: Add `HAVE_PCI`
Rares Miculescu [Sat, 9 Sep 2023 22:14:52 +0000 (01:14 +0300)]
drivers/ukbus: Add `HAVE_PCI`

Add `HAVE_PCI` to limit menuconfig PCI options to
platforms that provide this feature.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat/kvm: Update `kvm/Config.uk` and `kvm/Makefile.uk`
Rares Miculescu [Sat, 9 Sep 2023 22:11:31 +0000 (01:11 +0300)]
plat/kvm: Update `kvm/Config.uk` and `kvm/Makefile.uk`

Remove VIRTIO from `kvm/Makefile.uk` and
update VIRTIO drivers on KVM:

* Enable the VIRTIO PCI driver on KVM QEMU VMMs.
* Enable the VIRTIO MMIO driver on all KVM VMMs for arm64.
* Enable the VIRTIO BLK and NET drivers for both
  KVM QEMU and Firecracker.
* Enable the VIRTIO 9P driver for when `LIBUK9P`
  is selected.
* Correct indentation

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agodrivers/virtio: Update include guards
Rares Miculescu [Sat, 9 Sep 2023 22:09:14 +0000 (01:09 +0300)]
drivers/virtio: Update include guards

Update include guards to the drivers convention.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agodrivers/virtio: Add `VIRTIO_DEVICE`
Rares Miculescu [Sat, 9 Sep 2023 21:56:26 +0000 (00:56 +0300)]
drivers/virtio: Add `VIRTIO_DEVICE`

Create `VIRTIO_DEVICE` to avoid typing all devices one by one.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO PCI driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:52:26 +0000 (00:52 +0300)]
plat: Migrate VIRTIO PCI driver to drivers/virtio/

Migrate VIRTIO PCI driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO NET driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:50:15 +0000 (00:50 +0300)]
plat: Migrate VIRTIO NET driver to drivers/virtio/

Migrate VIRTIO NET driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO MMIO driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:47:38 +0000 (00:47 +0300)]
plat: Migrate VIRTIO MMIO driver to drivers/virtio/

Migrate VIRTIO MMIO driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO BLK driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:44:08 +0000 (00:44 +0300)]
plat: Migrate VIRTIO BLK driver to drivers/virtio/

Migrate VIRTIO BLK driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO 9P driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:39:41 +0000 (00:39 +0300)]
plat: Migrate VIRTIO 9P driver to drivers/virtio/

Migrate the VIRTIO 9P driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO BUS driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:36:05 +0000 (00:36 +0300)]
plat: Migrate VIRTIO BUS driver to drivers/virtio/

Migrate VIRTIO BUS driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO RING driver to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:21:27 +0000 (00:21 +0300)]
plat: Migrate VIRTIO RING driver to drivers/virtio/

Migrate VIRTIO RING driver to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Migrate VIRTIO headers to drivers/virtio/
Rares Miculescu [Sat, 9 Sep 2023 21:18:10 +0000 (00:18 +0300)]
plat: Migrate VIRTIO headers to drivers/virtio/

Migrate include folder to the newly introduced VIRTIO drivers
subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agoplat: Introduce VIRTIO to drivers subsystem
Rares Miculescu [Sat, 9 Sep 2023 21:03:31 +0000 (00:03 +0300)]
plat: Introduce VIRTIO to drivers subsystem

Introduce VIRTIO to newly introduced drivers subsystem.

Signed-off-by: Rares Miculescu <miculescur@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #967

19 months agolib/9pfs: Add check for `NULL` `data` in `uk_9pfs_parse_options`
Sergiu Moga [Fri, 8 Sep 2023 09:10:40 +0000 (12:10 +0300)]
lib/9pfs: Add check for `NULL` `data` in `uk_9pfs_parse_options`

The `mount` system call may actually allow ignoring the `data`
argument depending on the usecase. Therefore allow `data` to be
`NULL` by adding a check in `uk_9pfs_parse_options`.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1086

19 months agolib/9pfs: Remove `__unused` from `uk_9pfs_parse_options`'s `data`
Sergiu Moga [Fri, 8 Sep 2023 09:09:16 +0000 (12:09 +0300)]
lib/9pfs: Remove `__unused` from `uk_9pfs_parse_options`'s `data`

Since `uk_9pfs_parse_options` actually processes `data` it is actually
used, so remove this false `__unused`.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1086

19 months agoarch/ctx.h: Update ctx members declaration order
Stefan Jumarea [Sat, 9 Sep 2023 10:54:25 +0000 (13:54 +0300)]
arch/ctx.h: Update ctx members declaration order

Out-of-order designated initialization is not allowed in C++, so change
the `ctx` declaration order to match the `ukarch_ctx` definition order.

Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1085

19 months agodoc: Add KIT to ADOPTERS.md
Lukas Werling [Wed, 23 Aug 2023 12:50:31 +0000 (14:50 +0200)]
doc: Add KIT to ADOPTERS.md

Signed-off-by: Lukas Werling <lukas.werling@kit.edu>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1068

20 months agoplat/kvm: Enable the platform bus by default on arm64
Michalis Pappas [Mon, 28 Aug 2023 20:59:45 +0000 (22:59 +0200)]
plat/kvm: Enable the platform bus by default on arm64

Enable the platform bus driver on all KVM VMMs for arm64.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1024

20 months agodrivers/ukbus/platform: Update include guards
Michalis Pappas [Tue, 29 Aug 2023 17:26:53 +0000 (19:26 +0200)]
drivers/ukbus/platform: Update include guards

Update include guards to the drivers convention and add guards for
linkage with C++.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1024