rust-vmm / mshv

Crates for Microsoft Hypervisor ioctls and bindings
Apache License 2.0
29 stars 12 forks source link

mshv-ioctls/system: Enable Direct mode stimer #131

Closed praveen-pk closed 5 months ago

praveen-pk commented 6 months ago

Summary of the PR

Enable direct mode for synthetic timers. This allows synthetic timer interrupts to work early in the boot without having to wait for VMbus to be initialized.

liuw commented 6 months ago

@NunoDasNeves @jinankjain @russell-islam I will leave this to you.

russell-islam commented 6 months ago

@praveen-pk Do you know which CPU register is used for this timer?

praveen-pk commented 6 months ago

@praveen-pk Do you know which CPU register is used for this timer?

HV_REGISTER_FEATURES (0x00000200), seems to be part of CPUID.

jinankjain commented 6 months ago

@praveen-pk Are there any performance implications by turning on the stimer?

praveen-pk commented 5 months ago

@praveen-pk Are there any performance implications by turning on the stimer?

If any, this should reduce the overhead of passing timer interrupts to guest. So, this change should not have any negative performance implications.

https://lore.kernel.org/all/20180212003320.6748-8-kys@exchange.microsoft.com.