WSL2-Linux-Kernel/arch/x86/kvm
Takashi Iwai 29282fde80 KVM: x86: Fix invalid secondary exec controls in vmx_cpuid_update()
The commit [ad756a16: KVM: VMX: Implement PCID/INVPCID for guests with
EPT] introduced the unconditional access to SECONDARY_VM_EXEC_CONTROL,
and this triggers kernel warnings like below on old CPUs:

    vmwrite error: reg 401e value a0568000 (err 12)
    Pid: 13649, comm: qemu-kvm Not tainted 3.7.0-rc4-test2+ #154
    Call Trace:
     [<ffffffffa0558d86>] vmwrite_error+0x27/0x29 [kvm_intel]
     [<ffffffffa054e8cb>] vmcs_writel+0x1b/0x20 [kvm_intel]
     [<ffffffffa054f114>] vmx_cpuid_update+0x74/0x170 [kvm_intel]
     [<ffffffffa03629b6>] kvm_vcpu_ioctl_set_cpuid2+0x76/0x90 [kvm]
     [<ffffffffa0341c67>] kvm_arch_vcpu_ioctl+0xc37/0xed0 [kvm]
     [<ffffffff81143f7c>] ? __vunmap+0x9c/0x110
     [<ffffffffa0551489>] ? vmx_vcpu_load+0x39/0x1a0 [kvm_intel]
     [<ffffffffa0340ee2>] ? kvm_arch_vcpu_load+0x52/0x1a0 [kvm]
     [<ffffffffa032dcd4>] ? vcpu_load+0x74/0xd0 [kvm]
     [<ffffffffa032deb0>] kvm_vcpu_ioctl+0x110/0x5e0 [kvm]
     [<ffffffffa032e93d>] ? kvm_dev_ioctl+0x4d/0x4a0 [kvm]
     [<ffffffff8117dc6f>] do_vfs_ioctl+0x8f/0x530
     [<ffffffff81139d76>] ? remove_vma+0x56/0x60
     [<ffffffff8113b708>] ? do_munmap+0x328/0x400
     [<ffffffff81187c8c>] ? fget_light+0x4c/0x100
     [<ffffffff8117e1a1>] sys_ioctl+0x91/0xb0
     [<ffffffff815a942d>] system_call_fastpath+0x1a/0x1f

This patch adds a check for the availability of secondary exec
control to avoid these warnings.

Cc: <stable@vger.kernel.org> [v3.6+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-11-16 20:25:18 -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: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) 2012-11-12 21:16:45 -02: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: x86: Fix invalid secondary exec controls in vmx_cpuid_update() 2012-11-16 20:25:18 -02:00
x86.c KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) 2012-11-12 21:16:45 -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