diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/topology.h | 2 | ||||
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 1 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
4 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 4850e4b02b61..ff386ff50ed7 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -239,7 +239,7 @@ struct pci_bus; | |||
239 | void set_pci_bus_resources_arch_default(struct pci_bus *b); | 239 | void set_pci_bus_resources_arch_default(struct pci_bus *b); |
240 | 240 | ||
241 | #ifdef CONFIG_SMP | 241 | #ifdef CONFIG_SMP |
242 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | 242 | #define mc_capable() (cpus_weight(per_cpu(cpu_core_map, 0)) != nr_cpu_ids) |
243 | #define smt_capable() (smp_num_siblings > 1) | 243 | #define smt_capable() (smp_num_siblings > 1) |
244 | #endif | 244 | #endif |
245 | 245 | ||
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index f1983d9477cd..410ddbc1aa2e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1038,13 +1038,13 @@ static int kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp) | |||
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | rmap_write_protect(vcpu->kvm, sp->gfn); | 1040 | rmap_write_protect(vcpu->kvm, sp->gfn); |
1041 | kvm_unlink_unsync_page(vcpu->kvm, sp); | ||
1041 | if (vcpu->arch.mmu.sync_page(vcpu, sp)) { | 1042 | if (vcpu->arch.mmu.sync_page(vcpu, sp)) { |
1042 | kvm_mmu_zap_page(vcpu->kvm, sp); | 1043 | kvm_mmu_zap_page(vcpu->kvm, sp); |
1043 | return 1; | 1044 | return 1; |
1044 | } | 1045 | } |
1045 | 1046 | ||
1046 | kvm_mmu_flush_tlb(vcpu); | 1047 | kvm_mmu_flush_tlb(vcpu); |
1047 | kvm_unlink_unsync_page(vcpu->kvm, sp); | ||
1048 | return 0; | 1048 | return 0; |
1049 | } | 1049 | } |
1050 | 1050 | ||
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 613ec9aa674a..84eee43bbe74 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -331,6 +331,7 @@ static int FNAME(shadow_walk_entry)(struct kvm_shadow_walk *_sw, | |||
331 | r = kvm_read_guest_atomic(vcpu->kvm, gw->pte_gpa[level - 2], | 331 | r = kvm_read_guest_atomic(vcpu->kvm, gw->pte_gpa[level - 2], |
332 | &curr_pte, sizeof(curr_pte)); | 332 | &curr_pte, sizeof(curr_pte)); |
333 | if (r || curr_pte != gw->ptes[level - 2]) { | 333 | if (r || curr_pte != gw->ptes[level - 2]) { |
334 | kvm_mmu_put_page(shadow_page, sptep); | ||
334 | kvm_release_pfn_clean(sw->pfn); | 335 | kvm_release_pfn_clean(sw->pfn); |
335 | sw->sptep = NULL; | 336 | sw->sptep = NULL; |
336 | return 1; | 337 | return 1; |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d06b4dc0e2ea..a4018b01e1f9 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3149,7 +3149,9 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu) | |||
3149 | 3149 | ||
3150 | if (cpu_has_virtual_nmis()) { | 3150 | if (cpu_has_virtual_nmis()) { |
3151 | if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_injected) { | 3151 | if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_injected) { |
3152 | if (vmx_nmi_enabled(vcpu)) { | 3152 | if (vcpu->arch.interrupt.pending) { |
3153 | enable_nmi_window(vcpu); | ||
3154 | } else if (vmx_nmi_enabled(vcpu)) { | ||
3153 | vcpu->arch.nmi_pending = false; | 3155 | vcpu->arch.nmi_pending = false; |
3154 | vcpu->arch.nmi_injected = true; | 3156 | vcpu->arch.nmi_injected = true; |
3155 | } else { | 3157 | } else { |