diff options
author | Paul Durrant <[email protected]> | 2023-10-04 17:46:28 +0000 |
---|---|---|
committer | Sean Christopherson <[email protected]> | 2023-10-04 15:22:58 -0700 |
commit | 409f2e92a27a210fc768c5569851b4a419e6a232 (patch) | |
tree | 05a0545204a4a3269a10407543ddb19347b7eb5f | |
parent | 77c9b9dea4fb3e51e0d850db7f21cb1156d987bd (diff) |
KVM: x86/xen: ignore the VCPU_SSHOTTMR_future flag
Upstream Xen now ignores _VCPU_SSHOTTMR_future[1], since the only guest
kernel ever to use it was buggy. By ignoring the flag the guest will
always get a callback if it sets a negative timeout which upstream Xen
has determined not to cause problems for any guest setting the flag.
[1] https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909
Signed-off-by: Paul Durrant <[email protected]>
Reviewed-by: David Woodhouse <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
-rw-r--r-- | arch/x86/kvm/xen.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c index 75586da134b3..c539f18e0b60 100644 --- a/arch/x86/kvm/xen.c +++ b/arch/x86/kvm/xen.c @@ -1423,12 +1423,8 @@ static bool kvm_xen_hcall_vcpu_op(struct kvm_vcpu *vcpu, bool longmode, int cmd, return true; } + /* A delta <= 0 results in an immediate callback, which is what we want */ delta = oneshot.timeout_abs_ns - get_kvmclock_ns(vcpu->kvm); - if ((oneshot.flags & VCPU_SSHOTTMR_future) && delta < 0) { - *r = -ETIME; - return true; - } - kvm_xen_start_timer(vcpu, oneshot.timeout_abs_ns, delta); *r = 0; return true; |