linux/arch/x86/kvm
Xiao Guangrong 87da7e66a4 KVM: x86: fix vcpu->mmio_fragments overflow
After commit b3356bf0db (KVM: emulator: optimize "rep ins" handling),
the pieces of io data can be collected and write them to the guest memory
or MMIO together

Unfortunately, kvm splits the mmio access into 8 bytes and store them to
vcpu->mmio_fragments. If the guest uses "rep ins" to move large data, it
will cause vcpu->mmio_fragments overflow

The bug can be exposed by isapc (-M isapc):

[23154.818733] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
[ ......]
[23154.858083] Call Trace:
[23154.859874]  [<ffffffffa04f0e17>] kvm_get_cr8+0x1d/0x28 [kvm]
[23154.861677]  [<ffffffffa04fa6d4>] kvm_arch_vcpu_ioctl_run+0xcda/0xe45 [kvm]
[23154.863604]  [<ffffffffa04f5a1a>] ? kvm_arch_vcpu_load+0x17b/0x180 [kvm]

Actually, we can use one mmio_fragment to store a large mmio access then
split it when we pass the mmio-exit-info to userspace. After that, we only
need two entries to store mmio info for the cross-mmio pages access

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-10-31 20:36:30 -02:00
..
Kconfig KVM: Depend on HIGH_RES_TIMERS 2012-09-10 11:10:03 +03:00
Makefile KVM: Remove internal timer abstraction 2012-08-01 00:21:06 -03:00
cpuid.c KVM: x86: minor size optimization 2012-09-05 12:41:09 +03:00
cpuid.h KVM: VMX: Implement PCID/INVPCID for guests with EPT 2012-07-12 13:07:34 +03:00
emulate.c KVM: emulator: optimize "rep ins" handling 2012-09-06 18:07:38 +03:00
i8254.c KVM: fold kvm_pit_timer into kvm_kpit_state 2012-08-01 00:21:07 -03:00
i8254.h KVM: fold kvm_pit_timer into kvm_kpit_state 2012-08-01 00:21:07 -03:00
i8259.c KVM: PIC: fix use of uninitialised variable. 2012-09-04 15:44:42 +03:00
irq.c KVM: fix typo in copyright notice 2010-10-24 10:53:14 +02:00
irq.h KVM: switch to symbolic name for irq_states size 2012-07-20 16:12:16 -03:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
lapic.c KVM: apic: fix LDR calculation in x2apic mode 2012-10-22 18:03:27 +02:00
lapic.h KVM: optimize apic interrupt delivery 2012-09-20 15:05:26 +03:00
mmu.c KVM: MMU: fix release noslot pfn 2012-10-22 18:03:25 +02:00
mmu.h KVM: MMU: Optimize is_last_gpte() 2012-09-20 13:00:09 +03:00
mmu_audit.c KVM: do not release the error pfn 2012-08-06 16:04:57 +03:00
mmutrace.h KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint 2012-07-11 16:51:22 +03:00
paging_tmpl.h KVM: MMU: Eliminate pointless temporary 'ac' 2012-09-20 13:00:10 +03:00
pmu.c Merge branch 'queue' into next 2012-07-26 11:54:21 +03:00
svm.c KVM: x86: Fix guest debug across vcpu INIT reset 2012-09-23 15:00:07 +02:00
trace.h KVM: x86: Export svm/vmx exit code and vector code to userspace 2012-09-21 12:48:09 -03:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM updates for the 3.7 merge window 2012-10-04 09:30:33 -07:00
x86.c KVM: x86: fix vcpu->mmio_fragments overflow 2012-10-31 20:36:30 -02:00
x86.h KVM: use jump label to optimize checking for in kernel local apic presence 2012-08-06 19:00:44 +03:00