Skip to content

Commit 409f2e9

Browse files
Paul Durrantsean-jc
authored andcommitted
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 <pdurrant@amazon.com> Reviewed-by: David Woodhouse <dwmw@amazon.co.uk> Link: https://lore.kernel.org/r/20231004174628.2073263-1-paul@xen.org Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 77c9b9d commit 409f2e9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

arch/x86/kvm/xen.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,12 +1423,8 @@ static bool kvm_xen_hcall_vcpu_op(struct kvm_vcpu *vcpu, bool longmode, int cmd,
14231423
return true;
14241424
}
14251425

1426+
/* A delta <= 0 results in an immediate callback, which is what we want */
14261427
delta = oneshot.timeout_abs_ns - get_kvmclock_ns(vcpu->kvm);
1427-
if ((oneshot.flags & VCPU_SSHOTTMR_future) && delta < 0) {
1428-
*r = -ETIME;
1429-
return true;
1430-
}
1431-
14321428
kvm_xen_start_timer(vcpu, oneshot.timeout_abs_ns, delta);
14331429
*r = 0;
14341430
return true;

0 commit comments

Comments
 (0)