x86/vhpet: check that the set interrupt route is valid
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 5 Jul 2018 13:43:28 +0000 (15:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 5 Jul 2018 13:43:28 +0000 (15:43 +0200)
commitec40d3fe2147d7671d512d22b1dd418eff0124b1
tree908cbb7ebcbf4e75588681a3c4a16094debde0c4
parent74bd6429407c388a9b0add410dba7aa9f37b9440
x86/vhpet: check that the set interrupt route is valid

The value written by the guest must be valid according to the mask
provided in the interrupt routing capabilities register. If the
interrupt is not valid set it to the first valid IRQ in the
capabilities field if the timer is enabled, else just clear the field.

Also refuse to start any timer that has an invalid interrupt route.

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