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 tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Radim Krčmář:
"PPC:
- Fix bug which could leave locks held in the host on return to a
guest.

x86:
- Prevent infinitely looping emulation of a failing syscall while
single stepping.

- Do not crash the host when nesting is disabled"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86: Don't update RIP or do single-step on faulting emulation
KVM: x86: hyper-v: don't crash on KVM_GET_SUPPORTED_HV_CPUID when kvm_intel.nested is disabled
KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling

+19 -16
+4 -2
arch/powerpc/kvm/book3s_64_vio.c
··· 660 660 } 661 661 tce = be64_to_cpu(tce); 662 662 663 - if (kvmppc_tce_to_ua(vcpu->kvm, tce, &ua)) 664 - return H_PARAMETER; 663 + if (kvmppc_tce_to_ua(vcpu->kvm, tce, &ua)) { 664 + ret = H_PARAMETER; 665 + goto unlock_exit; 666 + } 665 667 666 668 list_for_each_entry_lockless(stit, &stt->iommu_tables, next) { 667 669 ret = kvmppc_tce_iommu_map(vcpu->kvm, stt,
+4 -2
arch/powerpc/kvm/book3s_64_vio_hv.c
··· 556 556 unsigned long tce = be64_to_cpu(((u64 *)tces)[i]); 557 557 558 558 ua = 0; 559 - if (kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua, NULL)) 560 - return H_PARAMETER; 559 + if (kvmppc_rm_tce_to_ua(vcpu->kvm, tce, &ua, NULL)) { 560 + ret = H_PARAMETER; 561 + goto unlock_exit; 562 + } 561 563 562 564 list_for_each_entry_lockless(stit, &stt->iommu_tables, next) { 563 565 ret = kvmppc_rm_tce_iommu_map(vcpu->kvm, stt,
+4 -1
arch/x86/kvm/hyperv.c
··· 1781 1781 int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, 1782 1782 struct kvm_cpuid_entry2 __user *entries) 1783 1783 { 1784 - uint16_t evmcs_ver = kvm_x86_ops->nested_get_evmcs_version(vcpu); 1784 + uint16_t evmcs_ver = 0; 1785 1785 struct kvm_cpuid_entry2 cpuid_entries[] = { 1786 1786 { .function = HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS }, 1787 1787 { .function = HYPERV_CPUID_INTERFACE }, ··· 1792 1792 { .function = HYPERV_CPUID_NESTED_FEATURES }, 1793 1793 }; 1794 1794 int i, nent = ARRAY_SIZE(cpuid_entries); 1795 + 1796 + if (kvm_x86_ops->nested_get_evmcs_version) 1797 + evmcs_ver = kvm_x86_ops->nested_get_evmcs_version(vcpu); 1795 1798 1796 1799 /* Skip NESTED_FEATURES if eVMCS is not supported */ 1797 1800 if (!evmcs_ver)
+1 -7
arch/x86/kvm/svm.c
··· 7128 7128 return ret; 7129 7129 } 7130 7130 7131 - static uint16_t nested_get_evmcs_version(struct kvm_vcpu *vcpu) 7132 - { 7133 - /* Not supported */ 7134 - return 0; 7135 - } 7136 - 7137 7131 static int nested_enable_evmcs(struct kvm_vcpu *vcpu, 7138 7132 uint16_t *vmcs_version) 7139 7133 { ··· 7326 7332 .mem_enc_unreg_region = svm_unregister_enc_region, 7327 7333 7328 7334 .nested_enable_evmcs = nested_enable_evmcs, 7329 - .nested_get_evmcs_version = nested_get_evmcs_version, 7335 + .nested_get_evmcs_version = NULL, 7330 7336 7331 7337 .need_emulation_on_page_fault = svm_need_emulation_on_page_fault, 7332 7338 };
+1
arch/x86/kvm/vmx/vmx.c
··· 7797 7797 .set_nested_state = NULL, 7798 7798 .get_vmcs12_pages = NULL, 7799 7799 .nested_enable_evmcs = NULL, 7800 + .nested_get_evmcs_version = NULL, 7800 7801 .need_emulation_on_page_fault = vmx_need_emulation_on_page_fault, 7801 7802 }; 7802 7803
+5 -4
arch/x86/kvm/x86.c
··· 6594 6594 unsigned long rflags = kvm_x86_ops->get_rflags(vcpu); 6595 6595 toggle_interruptibility(vcpu, ctxt->interruptibility); 6596 6596 vcpu->arch.emulate_regs_need_sync_to_vcpu = false; 6597 - kvm_rip_write(vcpu, ctxt->eip); 6598 - if (r == EMULATE_DONE && ctxt->tf) 6599 - kvm_vcpu_do_singlestep(vcpu, &r); 6600 6597 if (!ctxt->have_exception || 6601 - exception_type(ctxt->exception.vector) == EXCPT_TRAP) 6598 + exception_type(ctxt->exception.vector) == EXCPT_TRAP) { 6599 + kvm_rip_write(vcpu, ctxt->eip); 6600 + if (r == EMULATE_DONE && ctxt->tf) 6601 + kvm_vcpu_do_singlestep(vcpu, &r); 6602 6602 __kvm_set_rflags(vcpu, ctxt->eflags); 6603 + } 6603 6604 6604 6605 /* 6605 6606 * For STI, interrupts are shadowed; so KVM_REQ_EVENT will