@@ -328,13 +328,16 @@ For vendor-specific recommendations, please consult the resources below:
328328- ARM:
329329 [ Speculative Processor Vulnerability] ( https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability )
330330
331- ##### [ ARM only] Physical counter directly passed through to the guest
331+ ##### [ ARM only] VM Physical counter behaviour
332332
333- On ARM, the physical counter (i.e ` CNTPCT ` ) it is returning the
334- [ actual EL1 physical counter value of the host] [ 1 ] . From the discussions before
335- merging this change [ upstream] [ 2 ] , this seems like a conscious design decision
336- of the ARM code contributors, giving precedence to performance over the ability
337- to trap and control this in the hypervisor.
333+ On ARM, Firecracker tries to reset the ` CNTPCT ` physical counter on VM boot.
334+ This is done in order to prevent VM from reading host physical counter value.
335+ Firecracker will only try to reset the counter if the host KVM contains
336+ ` KVM_CAP_COUNTER_OFFSET ` capability. This capability is only present in kernels
337+ containing
338+ [ this
] ( https://lore.kernel.org/all/[email protected] / ) 339+ patch series (starting from 6.4 and newer). For older kernels the counter value
340+ will be passed through from the host.
338341
339342##### Verification
340343
@@ -428,6 +431,3 @@ To validate that the change took effect, the file
428431[ ^ 1 ] : Look for ` GRUB_CMDLINE_LINUX ` in file ` /etc/default/grub ` in RPM-based
429432 systems, and
430433 [ this doc for Ubuntu] ( https://wiki.ubuntu.com/Kernel/KernelBootParameters ) .
431-
432- [ 1 ] : https://elixir.free-electrons.com/linux/v4.14.203/source/virt/kvm/arm/hyp/timer-sr.c#L63
433- [ 2 ] : https://lists.cs.columbia.edu/pipermail/kvmarm/2017-January/023323.html
0 commit comments