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

Commit b8e81a3b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull KVM fixes from Marcelo Tosatti:
 "KVM bug fixes, including a SVM interrupt injection regression fix,
  MIPS and ARM bug fixes"

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: MIPS: Enable after disabling interrupt
  KVM: MIPS: Fix trace event to save PC directly
  KVM: SVM: fix interrupt injection (apic->isr_count always 0)
  KVM: emulate: fix CMPXCHG8B on 32-bit hosts
  KVM: VMX: fix build without CONFIG_SMP
  arm/arm64: KVM: Add exit reaons to kvm_exit event tracing
  ARM: KVM: Fix size check in __coherent_cache_guest_page
parents f2cb4777 cfec0e75
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -207,7 +207,7 @@ static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn,


	bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached;
	bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached;


	VM_BUG_ON(size & PAGE_MASK);
	VM_BUG_ON(size & ~PAGE_MASK);


	if (!need_flush && !icache_is_pipt())
	if (!need_flush && !icache_is_pipt())
		goto vipt_cache;
		goto vipt_cache;
+1 −1
Original line number Original line Diff line number Diff line
@@ -540,7 +540,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)


		vcpu->mode = OUTSIDE_GUEST_MODE;
		vcpu->mode = OUTSIDE_GUEST_MODE;
		kvm_guest_exit();
		kvm_guest_exit();
		trace_kvm_exit(*vcpu_pc(vcpu));
		trace_kvm_exit(kvm_vcpu_trap_get_class(vcpu), *vcpu_pc(vcpu));
		/*
		/*
		 * We may have taken a host interrupt in HYP mode (ie
		 * We may have taken a host interrupt in HYP mode (ie
		 * while executing the guest). This interrupt is still
		 * while executing the guest). This interrupt is still
+7 −3
Original line number Original line Diff line number Diff line
@@ -25,18 +25,22 @@ TRACE_EVENT(kvm_entry,
);
);


TRACE_EVENT(kvm_exit,
TRACE_EVENT(kvm_exit,
	TP_PROTO(unsigned long vcpu_pc),
	TP_PROTO(unsigned int exit_reason, unsigned long vcpu_pc),
	TP_ARGS(vcpu_pc),
	TP_ARGS(exit_reason, vcpu_pc),


	TP_STRUCT__entry(
	TP_STRUCT__entry(
		__field(	unsigned int,	exit_reason	)
		__field(	unsigned long,	vcpu_pc		)
		__field(	unsigned long,	vcpu_pc		)
	),
	),


	TP_fast_assign(
	TP_fast_assign(
		__entry->exit_reason		= exit_reason;
		__entry->vcpu_pc		= vcpu_pc;
		__entry->vcpu_pc		= vcpu_pc;
	),
	),


	TP_printk("PC: 0x%08lx", __entry->vcpu_pc)
	TP_printk("HSR_EC: 0x%04x, PC: 0x%08lx",
		  __entry->exit_reason,
		  __entry->vcpu_pc)
);
);


TRACE_EVENT(kvm_guest_fault,
TRACE_EVENT(kvm_guest_fault,
+1 −0
Original line number Original line Diff line number Diff line
@@ -216,6 +216,7 @@ int kvm_mips_host_tlb_write(struct kvm_vcpu *vcpu, unsigned long entryhi,
	if (idx > current_cpu_data.tlbsize) {
	if (idx > current_cpu_data.tlbsize) {
		kvm_err("%s: Invalid Index: %d\n", __func__, idx);
		kvm_err("%s: Invalid Index: %d\n", __func__, idx);
		kvm_mips_dump_host_tlbs();
		kvm_mips_dump_host_tlbs();
		local_irq_restore(flags);
		return -1;
		return -1;
	}
	}


+3 −3
Original line number Original line Diff line number Diff line
@@ -24,18 +24,18 @@ TRACE_EVENT(kvm_exit,
	    TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason),
	    TP_PROTO(struct kvm_vcpu *vcpu, unsigned int reason),
	    TP_ARGS(vcpu, reason),
	    TP_ARGS(vcpu, reason),
	    TP_STRUCT__entry(
	    TP_STRUCT__entry(
			__field(struct kvm_vcpu *, vcpu)
			__field(unsigned long, pc)
			__field(unsigned int, reason)
			__field(unsigned int, reason)
	    ),
	    ),


	    TP_fast_assign(
	    TP_fast_assign(
			__entry->vcpu = vcpu;
			__entry->pc = vcpu->arch.pc;
			__entry->reason = reason;
			__entry->reason = reason;
	    ),
	    ),


	    TP_printk("[%s]PC: 0x%08lx",
	    TP_printk("[%s]PC: 0x%08lx",
		      kvm_mips_exit_types_str[__entry->reason],
		      kvm_mips_exit_types_str[__entry->reason],
		      __entry->vcpu->arch.pc)
		      __entry->pc)
);
);


#endif /* _TRACE_KVM_H */
#endif /* _TRACE_KVM_H */
Loading