x86/hvm/viridian: save APIC assist vector
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 29 Mar 2016 12:26:03 +0000 (14:26 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Mar 2016 12:26:03 +0000 (14:26 +0200)
commit78c5f59ebd79117321a988c200048b5d94aa5df6
tree459af84dcd80349385123b68e04dc96013518c07
parent966a420c010355bd7c28f8a75e31e713715f6afa
x86/hvm/viridian: save APIC assist vector

If any vcpu has a pending APIC assist when the domain is suspended
then the vector needs to be saved. If this is not done then it's
possible for the vector to remain pending in the vlapic ISR
indefinitely after resume.

This patch adds code to save the APIC assist vector value in the
viridian vcpu save record. This means that the record is now zero-
extended on load and, because this implies a loaded value of
zero means nothing is pending (for backwards compatibility with
hosts not implementing APIC assist), the rest of the viridian APIC
assist code is adjusted to treat a zero value in this way. A
check has therefore been added to viridian_start_apic_assist() to
prevent the enlightenment being used for vectors < 0x10 (which
are illegal for an APIC).

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/viridian.c
xen/arch/x86/hvm/vlapic.c
xen/include/public/arch-x86/hvm/save.h