Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
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 a bug causing occasional machine check exceptions on POWER8
hosts (introduced in 4.16-rc1)

x86:
- Fix a guest crashing regression with nested VMX and restricted
guest (introduced in 4.16-rc1)

- Fix dependency check for pv tlb flush (the wrong dependency that
effectively disabled the feature was added in 4.16-rc4, the
original feature in 4.16-rc1, so it got decent testing)"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86: Fix pv tlb flush dependencies
KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0
KVM: PPC: Book3S HV: Fix duplication of host SLB entries

+25 -24
+18 -17
arch/powerpc/kvm/book3s_hv_rmhandlers.S
··· 1557 1557 ptesync 1558 1558 3: stw r5,VCPU_SLB_MAX(r9) 1559 1559 1560 + /* load host SLB entries */ 1561 + BEGIN_MMU_FTR_SECTION 1562 + b 0f 1563 + END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX) 1564 + ld r8,PACA_SLBSHADOWPTR(r13) 1565 + 1566 + .rept SLB_NUM_BOLTED 1567 + li r3, SLBSHADOW_SAVEAREA 1568 + LDX_BE r5, r8, r3 1569 + addi r3, r3, 8 1570 + LDX_BE r6, r8, r3 1571 + andis. r7,r5,SLB_ESID_V@h 1572 + beq 1f 1573 + slbmte r6,r5 1574 + 1: addi r8,r8,16 1575 + .endr 1576 + 0: 1577 + 1560 1578 guest_bypass: 1561 1579 stw r12, STACK_SLOT_TRAP(r1) 1562 1580 mr r3, r12 ··· 2036 2018 mtspr SPRN_LPCR,r8 2037 2019 isync 2038 2020 48: 2039 - /* load host SLB entries */ 2040 - BEGIN_MMU_FTR_SECTION 2041 - b 0f 2042 - END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX) 2043 - ld r8,PACA_SLBSHADOWPTR(r13) 2044 - 2045 - .rept SLB_NUM_BOLTED 2046 - li r3, SLBSHADOW_SAVEAREA 2047 - LDX_BE r5, r8, r3 2048 - addi r3, r3, 8 2049 - LDX_BE r6, r8, r3 2050 - andis. r7,r5,SLB_ESID_V@h 2051 - beq 1f 2052 - slbmte r6,r5 2053 - 1: addi r8,r8,16 2054 - .endr 2055 - 0: 2056 2021 #ifdef CONFIG_KVM_BOOK3S_HV_EXIT_TIMING 2057 2022 /* Finish timing, if we have a vcpu */ 2058 2023 ld r4, HSTATE_KVM_VCPU(r13)
+2 -2
arch/x86/kernel/kvm.c
··· 546 546 } 547 547 548 548 if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) && 549 - !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) 549 + kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) 550 550 pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others; 551 551 552 552 if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) ··· 635 635 int cpu; 636 636 637 637 if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) && 638 - !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { 638 + kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { 639 639 for_each_possible_cpu(cpu) { 640 640 zalloc_cpumask_var_node(per_cpu_ptr(&__pv_tlb_mask, cpu), 641 641 GFP_KERNEL, cpu_to_node(cpu));
+5 -5
arch/x86/kvm/vmx.c
··· 10711 10711 struct vcpu_vmx *vmx = to_vmx(vcpu); 10712 10712 u32 exec_control, vmcs12_exec_ctrl; 10713 10713 10714 + if (vmx->nested.dirty_vmcs12) { 10715 + prepare_vmcs02_full(vcpu, vmcs12, from_vmentry); 10716 + vmx->nested.dirty_vmcs12 = false; 10717 + } 10718 + 10714 10719 /* 10715 10720 * First, the fields that are shadowed. This must be kept in sync 10716 10721 * with vmx_shadow_fields.h. ··· 10952 10947 vcpu->arch.efer &= ~(EFER_LMA | EFER_LME); 10953 10948 /* Note: modifies VM_ENTRY/EXIT_CONTROLS and GUEST/HOST_IA32_EFER */ 10954 10949 vmx_set_efer(vcpu, vcpu->arch.efer); 10955 - 10956 - if (vmx->nested.dirty_vmcs12) { 10957 - prepare_vmcs02_full(vcpu, vmcs12, from_vmentry); 10958 - vmx->nested.dirty_vmcs12 = false; 10959 - } 10960 10950 10961 10951 /* Shadow page tables on either EPT or shadow page tables. */ 10962 10952 if (nested_vmx_load_cr3(vcpu, vmcs12->guest_cr3, nested_cpu_has_ept(vmcs12),