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

Commit ac059c4f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull KVM fixes from Paolo Bonzini:
 - s390: nested virt fixes (new 4.8 feature)
 - x86: fixes for 4.8 regressions
 - ARM: two small bugfixes

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm-arm: Unmap shadow pagetables properly
  x86, clock: Fix kvm guest tsc initialization
  arm: KVM: Fix idmap overlap detection when the kernel is idmap'ed
  KVM: lapic: adjust preemption timer correctly when goes TSC backward
  KVM: s390: vsie: fix riccbd
  KVM: s390: don't use current->thread.fpu.* when accessing registers
parents 2c937eb4 27bd44e0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -158,8 +158,6 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
{
	int i;

	kvm_free_stage2_pgd(kvm);

	for (i = 0; i < KVM_MAX_VCPUS; ++i) {
		if (kvm->vcpus[i]) {
			kvm_arch_vcpu_free(kvm->vcpus[i]);
+3 −1
Original line number Diff line number Diff line
@@ -1714,7 +1714,8 @@ int kvm_mmu_init(void)
		 kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL));

	if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) &&
	    hyp_idmap_start <  kern_hyp_va(~0UL)) {
	    hyp_idmap_start <  kern_hyp_va(~0UL) &&
	    hyp_idmap_start != (unsigned long)__hyp_idmap_text_start) {
		/*
		 * The idmap page is intersecting with the VA space,
		 * it is not safe to continue further.
@@ -1893,6 +1894,7 @@ void kvm_arch_memslots_updated(struct kvm *kvm, struct kvm_memslots *slots)

void kvm_arch_flush_shadow_all(struct kvm *kvm)
{
	kvm_free_stage2_pgd(kvm);
}

void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
+6 −4
Original line number Diff line number Diff line
@@ -2231,9 +2231,10 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
		return -EINVAL;
	current->thread.fpu.fpc = fpu->fpc;
	if (MACHINE_HAS_VX)
		convert_fp_to_vx(current->thread.fpu.vxrs, (freg_t *)fpu->fprs);
		convert_fp_to_vx((__vector128 *) vcpu->run->s.regs.vrs,
				 (freg_t *) fpu->fprs);
	else
		memcpy(current->thread.fpu.fprs, &fpu->fprs, sizeof(fpu->fprs));
		memcpy(vcpu->run->s.regs.fprs, &fpu->fprs, sizeof(fpu->fprs));
	return 0;
}

@@ -2242,9 +2243,10 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
	/* make sure we have the latest values */
	save_fpu_regs();
	if (MACHINE_HAS_VX)
		convert_vx_to_fp((freg_t *)fpu->fprs, current->thread.fpu.vxrs);
		convert_vx_to_fp((freg_t *) fpu->fprs,
				 (__vector128 *) vcpu->run->s.regs.vrs);
	else
		memcpy(fpu->fprs, current->thread.fpu.fprs, sizeof(fpu->fprs));
		memcpy(fpu->fprs, vcpu->run->s.regs.fprs, sizeof(fpu->fprs));
	fpu->fpc = current->thread.fpu.fpc;
	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -584,7 +584,7 @@ static int pin_blocks(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
		/* Validity 0x0044 will be checked by SIE */
		if (rc)
			goto unpin;
		scb_s->gvrd = hpa;
		scb_s->riccbd = hpa;
	}
	return 0;
unpin:
+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ void __init kvmclock_init(void)
	put_cpu();

	x86_platform.calibrate_tsc = kvm_get_tsc_khz;
	x86_platform.calibrate_cpu = kvm_get_tsc_khz;
	x86_platform.get_wallclock = kvm_get_wallclock;
	x86_platform.set_wallclock = kvm_set_wallclock;
#ifdef CONFIG_X86_LOCAL_APIC
Loading