On 29/06/20 13:31, Roman Bolshakov wrote: > I implemented what you proposed using VMX-preemption timer in Pin-based > controls and regular hv_vcpu_run(). It works fine without noticable > regressions, I'll send that in v2. > > hv_vcpu_run_until() was also evaluated on macOS 10.15.5 but it degrades > VM performance significantly compared to explicit setting of > VMX-preepmtion timer value and hv_vcpu_run(). The performance issue was > observed on Broadwell-based MacBook Air and Ivy Bridge-based MacBook > Pro. > > macOS 11.0 Beta deprecated hv_vcpu_run() and introduced a special > declaration for hv_vcpu_run_until(), that's not available 10.15 - > HV_DEADLINE_FOREVER (UINT64_MAX, which is bigger than maximum value of > VMX-preeemption counter). Perhaps the performance issue is addressed > there.
Possibly. I'm worried that the preemption-timer trick will fail to run there, but we'll see. Paolo