x86/vpt: only try to resume timers belonging to enabled devices
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 27 Jul 2020 17:05:38 +0000 (19:05 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Jul 2020 18:33:28 +0000 (19:33 +0100)
commitb9e9ccbb11e4c54b498d3a08e48347c3cad72944
tree9f149705abf71d716fb1a4433575dfe8c04b7ca5
parentdc036ab9d506b997777c7656d9e6e4fa32bc582e
x86/vpt: only try to resume timers belonging to enabled devices

Check whether the emulated device is actually enabled before trying to
resume the associated timers.

Thankfully all those structures are zeroed at initialization, and
since the devices are not enabled they are never populated, which
triggers the pt->vcpu check at the beginning of pt_resume forcing an
exit from the function.

While there limit the scope of i and make it unsigned.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vpt.c