Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fix from Marcelo Tosatti:
"A correction for oops on module init with older Intel hosts."

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86: Fix invalid secondary exec controls in vmx_cpuid_update()

+7 -4
+7 -4
arch/x86/kvm/vmx.c
··· 6549 6549 } 6550 6550 } 6551 6551 6552 - exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL); 6553 6552 /* Exposing INVPCID only when PCID is exposed */ 6554 6553 best = kvm_find_cpuid_entry(vcpu, 0x7, 0); 6555 6554 if (vmx_invpcid_supported() && 6556 6555 best && (best->ebx & bit(X86_FEATURE_INVPCID)) && 6557 6556 guest_cpuid_has_pcid(vcpu)) { 6557 + exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL); 6558 6558 exec_control |= SECONDARY_EXEC_ENABLE_INVPCID; 6559 6559 vmcs_write32(SECONDARY_VM_EXEC_CONTROL, 6560 6560 exec_control); 6561 6561 } else { 6562 - exec_control &= ~SECONDARY_EXEC_ENABLE_INVPCID; 6563 - vmcs_write32(SECONDARY_VM_EXEC_CONTROL, 6564 - exec_control); 6562 + if (cpu_has_secondary_exec_ctrls()) { 6563 + exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL); 6564 + exec_control &= ~SECONDARY_EXEC_ENABLE_INVPCID; 6565 + vmcs_write32(SECONDARY_VM_EXEC_CONTROL, 6566 + exec_control); 6567 + } 6565 6568 if (best) 6566 6569 best->ebx &= ~bit(X86_FEATURE_INVPCID); 6567 6570 }