]> xenbits.xensource.com Git - xen.git/commit
vmx: fix save/restore issue with apicv
authorYang Zhang <yang.z.zhang@Intel.com>
Mon, 27 Oct 2014 15:40:18 +0000 (16:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 27 Oct 2014 15:40:18 +0000 (16:40 +0100)
commit607e8494c42397fb249191904066cace6ac9a880
tree00ff2e7e9d671960cbf7a62bd6ec98f612c7731b
parent281c892e3bdb0a56cfd8ab6516cd1a33c095c857
vmx: fix save/restore issue with apicv

This patch fixes two issues:

1. Interrupts on PIR are lost during save/restore. Syncing the PIR
into IRR during save will fix it.

2. EOI exit bitmap doesn't set up correctly after restore. Here we
will construct the eoi exit bitmap via (IRR | ISR). Though it may cause
unnecessary eoi exit of the interrupts that pending in IRR or ISR during
save/restore, each pending interrupt only causes one vmexit. The
subsequent interrupts will adjust the eoi exit bitmap correctly. So
the performance hurt can be ignored.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vlapic.c
xen/arch/x86/hvm/vmx/vmx.c
xen/include/asm-x86/hvm/vlapic.h