summaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorLiran Alon <liran.alon@oracle.com>2019-04-16 20:36:34 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-04-18 19:53:17 +0300
commitc09d65d9eab69985c75f98ed64541229f6fa9aa6 (patch)
treec741b2c49a84b863e5c8c27731c9f370a02c4509 /net/switchdev/switchdev.c
parent78671ab4c9f42e2348bff60e2f4a0b3bb62353af (diff)
downloadlinux-c09d65d9eab69985c75f98ed64541229f6fa9aa6.tar.xz
KVM: x86: Consider LAPIC TSC-Deadline timer expired if deadline too short
If guest sets MSR_IA32_TSCDEADLINE to value such that in host time-domain it's shorter than lapic_timer_advance_ns, we can reach a case that we call hrtimer_start() with expiration time set at the past. Because lapic_timer.timer is init with HRTIMER_MODE_ABS_PINNED, it is not allowed to run in softirq and therefore will never expire. To avoid such a scenario, verify that deadline expiration time is set on host time-domain further than (now + lapic_timer_advance_ns). A future patch can also consider adding a min_timer_deadline_ns module parameter, similar to min_timer_period_us to avoid races that amount of ns it takes to run logic could still call hrtimer_start() with expiration timer set at the past. Reviewed-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Liran Alon <liran.alon@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions