3450 Commits

Author SHA1 Message Date
c6183e6d72 TMP fixup 'vfs/block: renovate plugin' (fix 32bit)
Issue #2263.
2025-06-23 14:58:15 +02:00
7382e22e72 nic_router: fix state of packet waiting for ARP
This prevents duplicate packet acks and, thus, the following error on
the client side when the ack'd packet is released.

  Error: Bit_array: invalid clear
2025-06-23 14:58:15 +02:00
53fb46924c base,os: remove use of Xml_node::sub_node
Issue #5608
2025-06-23 14:58:15 +02:00
c7603f3904 mixer: avoid using Xml_node::sub_node
Issue #5245.
2025-06-23 11:38:33 +02:00
fd250375d9 fixup 'vfs/block: set default I/O buffer to 4 MiB' (warn on block_buffer_count usage)
Issue #2263.
2025-06-23 11:38:33 +02:00
6008387b39 vfs/block: renovate plugin
This commit renovates the aged VFS Block plugin by utilizing the
Block Job API.

The plugin still creates one connection to a Block provider but
operates in a non-blocking fashion. In case multiple VFS handles
concurrently operate on the connection - in the most common usage
there is only one VFS handle in use - the Job API serializes all
requests.

Requests that a larger than the configured I/O buffer, i.e. the
shared memory dataspace between the components, are transparently
handled by the Job API. The plugin itself does not contain a
block-cache.

Unaligned (the seek offset does not match a block-boundary) and/or
partial (the count is less than a full block) requests are handled
differently depending whether it is a read or write request:

For 'read' requests the starting block is round-down to the nearest
block to cover an unaligned start offset and the transfer count is
round-up (within reasons, e.g. end-of-file) to take care of partial
blocks at the end. The constraining parameters are stored in the
Job object and performing data memcopy operations adhere to them.

For 'write' requests any unaligned and/or partial operation will
lead to issuing a 'read' request first for the covering block in
question. A crooked request is dealt with in at most three rounds.
The first round handles the unaligned start offset, the second
tries to produce the largest aligned and full request while the
third and last round handles the remaining partial request. A
unaligned buffer of 4096 bytes is used to temporarily store the
required data.

For the time being the underlying block-size needs to be a multiple
of 512 and at most 4096 bytes. Accessing a larger underlying
block-size in smaller blocks, e.g. issuing 512 byte requests on
a 4096 bytes session, is possible but might incur substantial
overhead.

Fixes #2263.
2025-06-19 10:45:31 +02:00
b10470d145 block/client: call Block::info RPC at construction
The Block session information are static for the lifetime of the
connection (and is used internally by the Job API).

Issue #2263.
2025-06-19 10:42:48 +02:00
7950d64737 vfs/block: set default I/O buffer to 4 MiB
This commit raises the Packet_stream bulk-size to 4 MiB from the
128 KiB used before. It also removes the 'block_buffer_count' option
as the count is now calculated internally and covers the complete
bulk-size. A new 'io_buffer' option is introduced that manages the
bulk-size.

This change can double the throughput with sequential I/O operations
when employing larger block-sizes.

Issue #2263.
2025-06-19 10:41:56 +02:00
58450ccd5c fixup "event_filter: tolerate missing ROMs" (session upgrade, initial attach)
Issue #5595
2025-06-12 12:30:49 +02:00
91e99516af test/event_filter: fix spurious-wakeup messages
Issue #5411
2025-06-10 16:36:37 +02:00
7965d86860 event_filter: tolerate missing ROMs
By manually obtaining the ROM sessions for includes via 'Env::try_session'
instead of using 'Attached_rom_dataspace', the event filter becomes able
to gracefully deal with 'Session_error::DENIED' as non-fatal condition.
This is desirable when interactively configuring the event filter on
Sculpt OS where temporary misconfigurations are somewhat expected.

Issue #5595
2025-06-10 15:45:33 +02:00
425b8fc76f usb: remove default arguments from Urb constructor
Require users of Urb objects to provide all constructor arguments incl.
size, isoc_packets, and timeouts.

Issue #5599
2025-06-06 12:09:21 +02:00
64b9f9a29f foc: enable vmm_x86 test on Qemu/KVM on AMD 2025-06-06 11:16:14 +02:00
806c6806fd top: handle idle thread corner case
If the accumulated utilization data across all threads is zero,
inclusive the idle thread, we have an unexpected case. Either, the idle
thread has same value, or the other threads has some, but both groups should
not have 0 in sum.

In such cases, mark the output with a question mark and start guessing,
for the idle thread 100% (idle) and 0% for all other threads.

Without this commit, on seL4 the CPUs without a Genode thread
(so in SMP setups) won't be shown in the list at all.

Issue #5581
2025-06-06 11:13:58 +02:00
b0f91cd94b Cosmetics for Genode-Foundations 25.05 update 2025-06-05 17:12:05 +02:00
abeb30ceb3 genode_c_api/usb_client: support device-control timeouts
As the usb-host implementation warns about unset (resp. infinite)
device-control timeouts and timeouts > 5'000 ms, we equip the clients
with a parameter to define those timeouts.

Note, the only user of this API is currently lx_emul, which was adapted
to setup Linux USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT max timeout of
5'000 ms.

Issue #5500
Issue #5596
2025-06-05 09:25:34 +02:00
6a9d2bd1d5 depot: update recipe hashes 2025-05-28 08:23:47 +02:00
2e4d80b766 vmm_x86: enable kvm by default
Enable KVM by default, since beginning with Qemu 6.1.0 the initial
AMD-NPT fault is missing and no guest code is actually mapped by us ...

Qemu+KVM on AMD is working fine, however the initial guest fault address is
page aligned and not the exact IP as on Intel ...
2025-05-28 08:23:47 +02:00
6bd2c8990a sel4: increase run script resources
Issue #5581
2025-05-28 08:23:46 +02:00
7b93dc5d88 driver/ahci: avoid using Xml_node::sub_node
Issue #5245
2025-05-28 08:23:46 +02:00
f39336b402 Unify fixed-width C types
Fixes #5589
2025-05-28 08:23:46 +02:00
f741bac52a gpu/intel: Remove Mapping from Vram and tiling
The 'map' member of Vram was only used by set_tiling which is also not
used by current Mesa -> remove

issue #5245
2025-05-28 08:23:46 +02:00
d9fe20e9bf os: add 'for_each_return_address' for RISC-V
This enables 'Genode::backtrace' support for RISC-V

issue #5588
2025-05-28 08:23:46 +02:00
b722fe1ebc test-monitor_gdb: update memory map test patterns
Fixes #5584
2025-05-28 08:23:46 +02:00
2c997c97c5 vfs: prevent hiding of close() overloads
The change prevents the following build errors on riscv.

In file included from /data/depot/checker/api/vfs/2025-05-18/include/vfs/readonly_value_file_system.h:19,
                 from /data/depot/checker/src/vfs_legacy_oss/2025-05-18/src/lib/vfs/legacy_oss/vfs_oss.cc:22:
/data/depot/checker/api/vfs/2025-05-18/include/vfs/readonly_value_file_system.h: In instantiation of ‘class Vfs::Readonly_value_file_system<unsigned int>’:
/data/depot/checker/src/vfs_legacy_oss/2025-05-18/src/lib/vfs/legacy_oss/vfs_oss.cc:152:26:   required from here
  152 |                                 _channels_fs         .value(channels);
      |                                                      ^
/data/depot/checker/api/vfs/2025-05-18/include/vfs/single_file_system.h:229:22: error: ‘virtual void Vfs::Single_file_system::close(Vfs::Vfs_handle*)’ was hidden [-Werror=overloaded-virtual=]
  229 |                 void close(Vfs_handle *handle) override
      |                      ^~~~~
/data/depot/checker/api/vfs/2025-05-18/include/vfs/readonly_value_file_system.h:170:22: note:   by ‘void Vfs::Readonly_value_file_system< <template-parameter-1-1>, BUF_SIZE>::close(Vfs::Vfs_watch_handle*) [with T = unsigned int; unsigned int BUF_SIZE = 128]’
  170 |                 void close(Vfs_watch_handle *handle) override
      |                      ^~~~~

https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
suggests to address this by an explicit using statement.

Issue #5540
2025-05-28 08:23:46 +02:00
9a693ecf95 Add log-session to the black hole component
Fixes #5568
2025-05-28 08:23:45 +02:00
ccab3a2067 driver/nvme: avoid using Xml_node::sub_node
Issue #5245.
2025-05-28 08:23:45 +02:00
329c76a1be driver/acpi: avoid using Xml_node::sub_node
Issue #5245
2025-05-28 08:23:45 +02:00
907ccc719a nitpicker: avoid using Xml_node::sub_node
Issue #5245
2025-05-28 08:23:45 +02:00
53e8a68c38 sequence: avoid exception during XML parsing
Issue #5245
2025-05-28 08:23:45 +02:00
4197e432e9 sandbox: avoid using Xml_node::sub_node
Issue #5245
2025-05-28 08:23:45 +02:00
7107719d23 util/bit_allocator.h: remove C++ exceptions
This change affects the users of util/bit_array.h as well, e.g.,
os/packet_allocator.h, libc, and part_block.

Issue #5245
2025-05-28 08:23:45 +02:00
2bcaf6c51c core: remove 'new' from RAM-dataspace factory
Also drop the distinction between Alloc_ram_error and Alloc_error.

Issue #5245
2025-05-27 08:33:22 +02:00
e48976926a core: remove 'new' from TRACE service
Besides replacing 'new' by 'Memory::Constrained_obj_allocator',
this patch consolidates the error types of the RPC functions that
can produce allocation failures.

The patch also removes the use of 'Attached_ram_dataspace' and
'Attached_dataspace' because these utilities throw.

Allocation errors of the trace-control area are now explicitly reflected
by 'Constructed' state values to Cpu_root.

Issue #5245
2025-05-27 08:33:22 +02:00
0bf28224a7 base: use common Session_error in session factory
This patch unifies Parent::Session_error, Root::Create_error, and
Local_service::Create_error by using the centrally defined Session_error.
This type is now also used by Session_state::Factory, which thereby
becomes void of exceptions.

The patch also streamlines the Session_response enum type to become
consistent with the naming of the Session_error conditions.

Issue #5245
2025-05-27 08:33:22 +02:00
02a8e79064 event_filter: log number of present fingers
This extends the motion-logging of the log filter to also print the
number of present distinct touch IDs (i.e. fingers).

Issue #5578
2025-05-27 08:33:22 +02:00
2c7e040bd0 event_filter: make multitouch tracking more robust
When the multitouch driver occasionally looses track of a finger, it
may occur that touch id 0 is released before the other ids. This messes
with the gesture detection. This commit adds a Multitouch struct that reliably
tracks the presence of fingers for all gestures and thereby moves this state
out of the individual gestures.

Fixes #5578
2025-05-27 08:32:06 +02:00
b4a8642a72 base/quota_guard.h: remove exceptions
This patch replaces the use of exceptions and the 'Reservation' guard
object by the 'Allocation' pattern.

Issue #5245
2025-05-27 08:32:05 +02:00
bb94c2b3b1 root/component.h: support errors as return values
The '_create_session' method returns now a 'Create_result' instead
of a pointer. This result can either be a reference to the new
session object or an 'Create_error' code.

The '_upgrade_session' and '_destroy_session' method now take a
reference instead of a pointer as argument.

Fixes #5562
2025-05-27 08:32:05 +02:00
3df1c2edf5 os/packet_stream.h: propagate construction errors
The initialization of the packet-stream allocator via
'Range_allocator::add_range' can fail with an 'Alloc_error'. This could
be observed with run/nic_router_stress running in Pistachio.

The patch reflects the construction error as constant 'constructed' that
can now be evaluated by the creating code.

It also fixes the particular problem of the NIC/Uplink-session creation
error in the NIC router and adds diagnostic messages to reveal further
manifestations of this problem.

Fixes #5566
2025-05-27 08:32:04 +02:00
0260b4b6df depot_autopilot.run: add test-blit 2025-05-27 08:32:04 +02:00
dd3bb97c84 Unify handling of buffer-exceeded error conditions
- Introduce common Buffer_error type.
- Enforce the handling of buffer-exceeded errors.
- Unify interface of Reporter and Expanding_reporter,
  using Byte_range_ptr instead of basic types.
- Simplify the Xml_generator API by providing the plain
  class function Xml_generator::generate.
- Use Expanding_reporter where appropriate.

Fixes #5561
2025-05-27 08:32:04 +02:00
b57db1b90a gpu/intel: don't use Id_space::Conflicting_id
Issue #5245
2025-05-27 08:32:03 +02:00
b1500db97c usb: restrict client timeouts of control URBs
Issue #5500
2025-05-27 08:32:03 +02:00
36be730285 base: remove Allocator_avl::Assign_metadata_failed
Replace exception by a plain bool return value.
Use [[nodiscard]] to enforce the handling of errors.

Issue #5245
2025-05-27 08:32:03 +02:00
7d74277ee5 base: remove diagnostic throws from base lib
Replace try/catch/throw by guard objects.
In panic situations, print an error and sleep forever.
Infinitely block invalid IPC calls.
Weasel out of cap ref count overflows by clamping count to max.
Accept ID-space ambiguities but be verbose about it.
Skip Duration::add when detecting an integer overflow.

Issue #5245
2025-05-27 08:32:03 +02:00
5703f11f8e base: rm Xml_generator::Buffer_exceeded exception
Issue #5245
2025-05-27 08:32:03 +02:00
1d97d040eb base: remove exceptions from base/env.h
The Env::session method no longer throws 'Service_denied'. Instead, the
parent's denial is now considered as fatal, yielding an error message
and stopping the component. This is the common case where sessions are
established via 'Connection' objects. The failure to obtain a connection
because of the parent's decision is not recoverable.

The Env::try_session method now uses a result type instead of exceptions
to reflect all error conditions, including Session_error::DENIED. This
is useful for intermediary component like init, which initiate session
requests on behalf of their children and shall never reach a
non-recoverable state.

The change of Env has ripple effects through service.h and the child
framework. The former reflection of 'Out_of_ram' and 'Out_of_caps' by
Service::initiate_request has been replaced by a result type. The patch
adds diagnostic messages at all places where such errors are further
propagated.

Issue #5251
2025-05-27 08:32:03 +02:00
363ac5fcbc base/component.h: rm 'Service_denied' from aquire
Issue #5251
2025-05-27 08:32:02 +02:00
e1cb988d03 base: remove exceptions from base/child.h
This patch replaces 'Child_policy::resolve_session_request' with
an 'with_route' method that takes two functors as arguments. It also
removes the 'Service_denied' exception from local_connection.h, which,
in turn requires changing 'Child::pd' to 'Child::with_pd' to account for
the error case where a 'Child' object has been created but failed to
obtain its PD session.

Issue #5251
2025-05-27 08:32:02 +02:00