Commit Graph

117 Commits

Author SHA1 Message Date
Alexander Boettcher
48d6f0220c nova: avoid static smp code reservation
Using a segment to reserve the AP (application processor) code page does not
work if the region overlaps with other non-memory types, e.g. bender checks
for the overlapping and denies to boot on such machines.

Without bender, the system boots up fine. So, partially remove the nova commit
"Add segment to reserve AP startup page" and instead apply the idea of
Cyberus's version. Place the AP boot code later during boot and save and
restore the memory before/after SMP bootstrap.
2024-05-29 09:18:11 +02:00
Alexander Boettcher
97544ed7a9 nova: support iommu enabling per intel/amd
separately.  The "iommu" option is now split up into "iommu_intel" and
"iommu_amd" and thereby can be disabled easily if required for one of the CPU
vendors.

Fixes #5206
2024-05-29 09:18:11 +02:00
Alexander Boettcher
b33afb24d7 nova: adjust to cmdline changes of kernel
- no need to explicitly switch off vga anymore
- use vPID for VMs which improves TLB usage if multiple vCPUs on same
  pCPU is used, which happens to happen on Sculpt.
- support for mwait by nova kernel, which is off by default

Issue #5206
2024-05-29 09:18:11 +02:00
Alexander Boettcher
f0f66f8ccc nova: avoid ipi timeouts
Fixes #5204
2024-05-07 15:09:32 +02:00
Johannes Schlatow
518a57d8e5 base-nova: allow access to Intel IOMMU
This allows the platform driver to take over control of DMA remapping
and keeps NOVA-driven interrupt remapping active.

genodelabs/genode#5002
2023-11-30 14:22:54 +01:00
Johannes Schlatow
f55d06fd5c base-nova: allow MSI for non-PCI devices
DMA remapping hardware units use MSI for fault events. However, MSI
were bound to the presence of a PCI configuration space.

genodelabs/genode#5002
2023-11-28 19:35:16 +01:00
Alexander Boettcher
e36170c997 nova: add guarded access to MSRs
via Genode Pd::system_control interface

Issue #5009
2023-10-25 08:58:52 +02:00
Benjamin Lamowski
85012d5edd base-nova: port to new VMM library API
Ref #4968
2023-10-04 13:22:04 +02:00
Alexander Boettcher
5c27993884 nova: transfer guest fpu state via utcb
instead via the hardware registers of the FPU. On Genode all components and
so VMMs are built such, that the compiler may generate optimized code by
using the FPU at any time. We had to make sure to save the
FPU state as early as possible before the VMM component touches the FPU,
to avoid corrupting & losing guest FPU state. This caused headache again
and again. To avoid the uncertainty, we remove this feature and explicitly
transfer the FPU state via the UTCB.
2023-09-29 12:21:04 +02:00
Alexander Boettcher
5ffdda783b nova: remove timestamp from kernel binary
Fixes #4956
2023-07-14 12:06:32 +02:00
Alexander Boettcher
60b44f071b nova: avoid assertion during cross core IPC 2023-05-30 12:03:31 +02:00
Alexander Boettcher
75d43555c8 nova: limit rate of too long helper chain message
to 1 per every 10s.
2023-05-30 12:03:31 +02:00
Alexander Boettcher
de986c5f0b nova: make compatible with C++20
Fixes #4886
2023-05-30 12:03:30 +02:00
Alexander Boettcher
364ff0e65c nova: avoid initial wrong idle tracing times
Issue alex-ab/nova#9
2023-04-17 14:48:30 +02:00
Alexander Boettcher
ac69189e23 nova: support to re-enable IOMMU after ACPI resume
Issue #4669
2023-02-27 08:22:49 +01:00
Alexander Boettcher
d2f27a34f7 nova: avoid fault during thread migration
triggert by cpu_balancer.run on Qemu

Fixes #4742
2023-02-27 08:22:45 +01:00
Alexander Boettcher
c06f5e2661 nova: flush on iommu context change (intel)
Fixes #4717
2023-01-24 12:07:32 +01:00
Alexander Boettcher
41865e6c30 nova: avoid oom fault on cross CPU
Fixes #4719
2023-01-24 12:07:32 +01:00
Christian Helmuth
a16eeeec5d nova: set initial TSC after all CPUs are ready
Issue #4669
2023-01-24 12:07:28 +01:00
Alexander Boettcher
377f2166a1 nova: support detection of Intel P & E CPUs
Fixes #4694
2023-01-24 12:07:27 +01:00
Alexander Boettcher
03470e7bab nova: use kernel with suspend/resume support
Issue #4669
2022-11-18 14:45:27 +01:00
Alexander Boettcher
7ebd3a086a nova: avoid reset on machines with too many CPUs
The NOVA kernel and Genode's roottask core are configured to be runnable
with up to 64 CPUs (MAX_SUPPORTED_CPUS in core resp. NUM_CPU in kernel).
On machines with more CPUs a reset occurred. The commit checks for this
case, bootstraps the first 64 CPUs only, and sends all other CPUs to
sleep.

Also, the platform_info ROM size is increased to host information about
more than 32 CPUs.

Issue #4640
2022-11-17 08:00:34 +01:00
Alexander Boettcher
9e33e57294 nova: support more MSIs
Issue #4578

Ref alex-ab/nova#8
2022-10-12 12:09:34 +02:00
Christian Helmuth
ab9a2107e4 nova: support interrupt mode config in assign_gsi
Fixes #4553
2022-08-10 13:32:59 +02:00
Alexander Boettcher
858505918a nova: support EC time in trace subject info
The vanilla NOVA kernel solely supports tracking and exporting of execution
times per SC kernel object, but not per thread (EC object). The commit extends
to track execution times per EC in the NOVA kernel, exporting it to Genode's
'core' roottask and populating Genode's Trace::Subject_info structure.

Fixes #4481
2022-05-25 12:19:32 +02:00
Alexander Boettcher
f6fedd5348 x86: remove special GPE handling nova <-> acpica
Remove handling of ACPI (SCI) interrupt from kernel and thereby let the
handling of the ACPI irq exclusively to an Genode driver. On Genode the ACPICA
library+app handles the ACPI irq, where we can now remove the contrib patches
related to the synchronization between NOVA kernel and ACPICA library.

Fixes #4479
2022-05-25 12:19:31 +02:00
Alexander Boettcher
240ec72086 nova: handle invalid SVM exit correctly
With issue #4391 a regression was introduced, which makes VMs on AMD SVM non
working.
2022-04-25 14:40:04 +02:00
Alexander Boettcher
0d163915d0 nova: avoid hangs on AMD with IOMMUs
With the new usb driver #4399 and usage of the updated dde_linux lx_eml/lx_kit
approach a much higher rate of IRQ session construction/destruction and signal
handler assignment (irq->sigh) are caused. This trickles down to the kernel,
which causes an hang of the AMD IOMMUs due to not setting reserved bits
adequately. The commit fixes the root cause in the kernel and add a guard
into core's to limit such driver behaviour.

Fixes #4482
2022-04-23 22:53:03 +02:00
Christian Helmuth
ad4fb2b088 nova: fix IOTLB flush for global mode
Issue alex-ab/nova#6
2022-04-13 08:07:58 +02:00
Christian Helmuth
c56ac3e909 nova: support extended addresses in FADT
Issue alex-ab/nova#5
2022-04-13 08:07:58 +02:00
Alexander Boettcher
888b89c1c0 nova: avoid pagefault on invalid SVM exit
Fixes #4391
2022-02-15 10:23:15 +01:00
Alexander Boettcher
3a39cb86e9 nova: read out more accurate tsc frequency
on newer CPUs.

Fixes #4336
2022-01-19 14:16:53 +01:00
Alexander Boettcher
533015b93e nova: support transfer of IA32_TSC_AUX MSR for vCPUs
The 32-bit MSR is returned by rdtscp in ecx register and used to detect
the CPU ID the timestamp was taken on.

Issue #4314
2021-11-29 15:10:52 +01:00
Christian Prochaska
405e6744fb nova: update kernel for gcc 10
Fixes #4114
2021-05-05 11:35:30 +02:00
Alexander Boettcher
d6a5a66623 vbox5: enable 64bit SVM support
Fixes #3965
2021-02-23 12:02:42 +01:00
Alexander Boettcher
f358fcbda6 nova: flush Intel IOMMU caches
- when memory is detached

Issue #3963
2021-01-25 13:48:09 +01:00
Alexander Boettcher
c5de2acf57 vm_session(x86): support cstar register
Fixes #3964
2020-12-09 14:02:12 +01:00
Alexander Boettcher
b7ba508110 nova: update to kernel supporting AMD IO-MMU
Fixes #3928
2020-11-23 12:03:00 +01:00
Alexander Boettcher
04d3c9e750 nova: re-enable DMAR super pages in kernel
Fixes #3902
2020-10-09 13:35:55 +02:00
Alexander Boettcher
99fa203673 nova: add migration support for global threads
Fixes #3842
2020-10-09 13:33:36 +02:00
Alexander Boettcher
0a1bc1f4b7 nova: add requesting time of killed SCs
Fixes #3587
2019-12-19 17:01:42 +01:00
Alexander Boettcher
53a83fb76e nova: update kernel branch
- Avoid DoS against kernel, reported by Julian Stecklina
- Provide EFI systab pointer through HIP
- Fix PCID bug

Fixes #3440
2019-08-13 12:02:03 +02:00
Alexander Boettcher
b50e54b0a8 nova: adjust to g++ 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska
934ada72fa nova: remove deprecated 'register' keyword
Fixes #3350
2019-05-27 14:46:53 +02:00
Alexander Boettcher
26796c8f7a nova: update kernel branch
- sorting of initializer by Christian Prochaska - issue #3253
- leak of FPU register state reported by Julian Stecklina - thanks !
- fix page table synchronization bug - by Julian Stecklina
- add a second dynamic buddy if the memory requirements could not be fulfilled
  by the first dynamic buddy
- disable vtlb peek if EPT/NPT is enabled
2019-05-06 16:15:16 +02:00
Alexander Boettcher
30ddae0f91 nova: evaluate second kernel buddy earlier
Fixes #3195
2019-02-28 16:37:53 +01:00
Alexander Boettcher
0a0a6ef591 nova: de-schedule SCs in destruction earlier
Fixes issues detected during destruction in

Issue #3041
2019-01-07 12:25:45 +01:00
Alexander Boettcher
e6ddffb93c nova: exclude framebuffer range from buddy memory
Fixes #3013
2018-10-29 09:36:21 +01:00
Alexander Boettcher
ca727ea3d9 nova: update to latest r10 branch
- which avoids some false postive overmap mappings
- and contains more accurate kernel memory accounting.

Fixes #3009
2018-10-29 09:36:21 +01:00
Alexander Boettcher
3824ad4756 nova: define kernel memory based on system memory
Switch to kernel branch, that determines the available system memory during
boot time. The overall kernel memory is still static, but during boot time
dynamically the amount can be chosen. Following 3 config option exists:

CONFIG_MEMORY_BOOT is the amount of kernel memory allocated in the BSS
statically - effectively chosen during link time - see linker script.

CONFIG_MEMORY_DYN_MIN && CONFIG_MEMORY_DYN_PER_MILL configures the dynamic
part of the kernel memory allocation applied during early kernel boot time.
CONFIG_MEMORY_DYN_MIN is the amount of memory which should be allocated at
least. CONFIG_MEMORY_DYN_PER_MILL defines the amount of the system memory in
per mill which should be allocated at most. The overall maximum kernel memory
is restricted to ~1G (64bit), due to the chosen internal virtual memory layout.

Fixes #2985
2018-09-21 13:19:19 +02:00