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

Commit ee106891 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge branch 'kvm-ppc-next' of...

Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD

This brings in two fixes for potential host crashes, from Ben
Herrenschmidt and Nick Piggin.
parents 8ef81a9a 5982f084
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -236,6 +236,11 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
	mtctr	reg;							\
	bctr

#define BRANCH_LINK_TO_FAR(reg, label)					\
	__LOAD_FAR_HANDLER(reg, label);					\
	mtctr	reg;							\
	bctrl

/*
 * KVM requires __LOAD_FAR_HANDLER.
 *
@@ -260,6 +265,9 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
#define BRANCH_TO_COMMON(reg, label)					\
	b	label

#define BRANCH_LINK_TO_FAR(reg, label)					\
	bl	label

#define BRANCH_TO_KVM(reg, label)					\
	b	label

+0 −7
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ int64_t opal_pci_config_write_half_word(uint64_t phb_id, uint64_t bus_dev_func,
int64_t opal_pci_config_write_word(uint64_t phb_id, uint64_t bus_dev_func,
				   uint64_t offset, uint32_t data);
int64_t opal_set_xive(uint32_t isn, uint16_t server, uint8_t priority);
int64_t opal_rm_set_xive(uint32_t isn, uint16_t server, uint8_t priority);
int64_t opal_get_xive(uint32_t isn, __be16 *server, uint8_t *priority);
int64_t opal_register_exception_handler(uint64_t opal_exception,
					uint64_t handler_address,
@@ -220,18 +219,12 @@ int64_t opal_pci_set_power_state(uint64_t async_token, uint64_t id,
int64_t opal_pci_poll2(uint64_t id, uint64_t data);

int64_t opal_int_get_xirr(uint32_t *out_xirr, bool just_poll);
int64_t opal_rm_int_get_xirr(__be32 *out_xirr, bool just_poll);
int64_t opal_int_set_cppr(uint8_t cppr);
int64_t opal_int_eoi(uint32_t xirr);
int64_t opal_rm_int_eoi(uint32_t xirr);
int64_t opal_int_set_mfrr(uint32_t cpu, uint8_t mfrr);
int64_t opal_rm_int_set_mfrr(uint32_t cpu, uint8_t mfrr);
int64_t opal_pci_tce_kill(uint64_t phb_id, uint32_t kill_type,
			  uint32_t pe_num, uint32_t tce_size,
			  uint64_t dma_addr, uint32_t npages);
int64_t opal_rm_pci_tce_kill(uint64_t phb_id, uint32_t kill_type,
			     uint32_t pe_num, uint32_t tce_size,
			     uint64_t dma_addr, uint32_t npages);

/* Internal functions */
extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
+1 −1
Original line number Diff line number Diff line
@@ -982,7 +982,7 @@ TRAMP_REAL_BEGIN(hmi_exception_early)
	EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN)
	EXCEPTION_PROLOG_COMMON_3(0xe60)
	addi	r3,r1,STACK_FRAME_OVERHEAD
	bl	hmi_exception_realmode
	BRANCH_LINK_TO_FAR(r4, hmi_exception_realmode)
	/* Windup the stack. */
	/* Move original HSRR0 and HSRR1 into the respective regs */
	ld	r9,_MSR(r1)
+3 −3
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ fastsleep_workaround_at_entry:
	/* Fast sleep workaround */
	li	r3,1
	li	r4,1
	bl	opal_rm_config_cpu_idle_state
	bl	opal_config_cpu_idle_state

	/* Clear Lock bit */
	li	r0,0
@@ -544,7 +544,7 @@ timebase_resync:
	 */
	ble	cr3,clear_lock
	/* Time base re-sync */
	bl	opal_rm_resync_timebase;
	bl	opal_resync_timebase;
	/*
	 * If waking up from sleep, per core state is not lost, skip to
	 * clear_lock.
@@ -633,7 +633,7 @@ hypervisor_state_restored:
fastsleep_workaround_at_exit:
	li	r3,1
	li	r4,0
	bl	opal_rm_config_cpu_idle_state
	bl	opal_config_cpu_idle_state
	b	timebase_resync

/*
+1 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
		goto fail;
	}

	ret = -ENOMEM;
	stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *),
		      GFP_KERNEL);
	if (!stt)
Loading