Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d0ceac1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull kvm fixes from Avi Kivity:
 "KVM updates for 3.7-rc2"

* tag 'kvm-3.7-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM guest: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT
  KVM: apic: fix LDR calculation in x2apic mode
  KVM: MMU: fix release noslot pfn
parents e17b1315 c5e015d4
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -247,7 +247,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
		break;
		break;
	case KVM_PV_REASON_PAGE_NOT_PRESENT:
	case KVM_PV_REASON_PAGE_NOT_PRESENT:
		/* page is swapped out by the host. */
		/* page is swapped out by the host. */
		rcu_irq_enter();
		exit_idle();
		kvm_async_pf_task_wait((u32)read_cr2());
		kvm_async_pf_task_wait((u32)read_cr2());
		rcu_irq_exit();
		break;
		break;
	case KVM_PV_REASON_PAGE_READY:
	case KVM_PV_REASON_PAGE_READY:
		rcu_irq_enter();
		rcu_irq_enter();
+1 −1
Original line number Original line Diff line number Diff line
@@ -1311,7 +1311,7 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
	vcpu->arch.apic_base = value;
	vcpu->arch.apic_base = value;
	if (apic_x2apic_mode(apic)) {
	if (apic_x2apic_mode(apic)) {
		u32 id = kvm_apic_id(apic);
		u32 id = kvm_apic_id(apic);
		u32 ldr = ((id & ~0xf) << 16) | (1 << (id & 0xf));
		u32 ldr = ((id >> 4) << 16) | (1 << (id & 0xf));
		kvm_apic_set_ldr(apic, ldr);
		kvm_apic_set_ldr(apic, ldr);
	}
	}
	apic->base_address = apic->vcpu->arch.apic_base &
	apic->base_address = apic->vcpu->arch.apic_base &
+1 −2
Original line number Original line Diff line number Diff line
@@ -2497,7 +2497,6 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
		}
		}
	}
	}


	if (!is_error_pfn(pfn))
	kvm_release_pfn_clean(pfn);
	kvm_release_pfn_clean(pfn);
}
}


+1 −3
Original line number Original line Diff line number Diff line
@@ -1322,9 +1322,7 @@ EXPORT_SYMBOL_GPL(kvm_release_page_clean);


void kvm_release_pfn_clean(pfn_t pfn)
void kvm_release_pfn_clean(pfn_t pfn)
{
{
	WARN_ON(is_error_pfn(pfn));
	if (!is_error_pfn(pfn) && !kvm_is_mmio_pfn(pfn))

	if (!kvm_is_mmio_pfn(pfn))
		put_page(pfn_to_page(pfn));
		put_page(pfn_to_page(pfn));
}
}
EXPORT_SYMBOL_GPL(kvm_release_pfn_clean);
EXPORT_SYMBOL_GPL(kvm_release_pfn_clean);