[PATCH v2] KVM: x86: check ISR and TMR to construct eoi exit bitmap

2014-08-13 Thread Wei Wang
issue that commit "0f6c0a740b" tries to solve. Tested-by: Alex Williamson Signed-off-by: Yang Zhang Signed-off-by: Wei Wang --- arch/x86/kvm/lapic.c | 17 + arch/x86/kvm/lapic.h |2 ++ arch/x86/kvm/x86.c |9 + virt/kvm/ioapic.c|7 --

[PATCH] KVM: x86: sync old tmr with ioapic to update

2014-08-26 Thread Wei Wang
kvm_ioapic_scan_entry() needs to update tmr. The previous lapic tmr value (old_tmr) needs to sync with ioapic to get an accurate updated tmr value before the updating work. Tested-by: Rongrong Liu Signed-off-by: Yang Zhang Signed-off-by: Wei Wang --- arch/x86/kvm/lapic.c | 11

[PATCH] KVM: x86: keep EOI exit bitmap accurate before loading it.

2014-08-26 Thread Wei Wang
: Yang Zhang Signed-off-by: Wei Wang --- arch/x86/kvm/lapic.c |9 + arch/x86/kvm/lapic.h |2 ++ arch/x86/kvm/x86.c |1 + virt/kvm/ioapic.c|6 +++--- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 93c2e93

[PATCH v2] KVM: x86: sync old tmr with ioapic to update

2014-08-26 Thread Wei Wang
kvm_ioapic_scan_entry() needs to update tmr. The previous lapic tmr value (old_tmr) needs to sync with ioapic to get an accurate updated tmr value before the updating work. Tested-by: Rongrong Liu Signed-off-by: Yang Zhang Signed-off-by: Wei Wang --- arch/x86/kvm/lapic.c | 19

[PATCH v2] KVM: x86: keep eoi exit bitmap accurate before loading it.

2014-08-26 Thread Wei Wang
interrupts have their bits in eoi_exit_bitmap set. Tested-by: Rongrong Liu Signed-off-by: Yang Zhang Signed-off-by: Wei Wang --- arch/x86/kvm/lapic.c | 12 arch/x86/kvm/lapic.h |1 + arch/x86/kvm/x86.c |1 + virt/kvm/ioapic.c|7 --- 4 files changed, 18

[PATCH] KVM: x86: reset RVI upon system reset

2014-11-04 Thread Wei Wang
A bug was reported as follows: when running Windows 7 32-bit guests on qemu-kvm, sometimes the guests run into blue screen during reboot. The problem was that a guest's RVI was not cleared when it rebooted. This patch has fixed the problem. Signed-off-by: Wei Wang Signed-off-by: Yang