Commit 3ff03278 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge tag 'kvm-ppc-next-5.9-1' of...

Merge tag 'kvm-ppc-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-next-5.6

PPC KVM update for 5.9

- Improvements and bug-fixes for secure VM support, giving reduced startup
  time and memory hotplug support.
- Locking fixes in nested KVM code
- Increase number of guests supported by HV KVM to 4094
- Preliminary POWER10 support
parents 43bd9ef4 81ab595d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -895,6 +895,7 @@ Return values
    One of the following values:

	* H_SUCCESS	 on success.
        * H_STATE        if the VM is not in a position to switch to secure.

Description
~~~~~~~~~~~
@@ -933,6 +934,8 @@ Return values
	* H_UNSUPPORTED		if called from the wrong context (e.g.
				from an SVM or before an H_SVM_INIT_START
				hypercall).
	* H_STATE		if the hypervisor could not successfully
                                transition the VM to Secure VM.

Description
~~~~~~~~~~~
+14 −0
Original line number Diff line number Diff line
@@ -23,6 +23,10 @@ int kvmppc_send_page_to_uv(struct kvm *kvm, unsigned long gfn);
unsigned long kvmppc_h_svm_init_abort(struct kvm *kvm);
void kvmppc_uvmem_drop_pages(const struct kvm_memory_slot *free,
			     struct kvm *kvm, bool skip_page_out);
int kvmppc_uvmem_memslot_create(struct kvm *kvm,
		const struct kvm_memory_slot *new);
void kvmppc_uvmem_memslot_delete(struct kvm *kvm,
		const struct kvm_memory_slot *old);
#else
static inline int kvmppc_uvmem_init(void)
{
@@ -82,5 +86,15 @@ static inline int kvmppc_send_page_to_uv(struct kvm *kvm, unsigned long gfn)
static inline void
kvmppc_uvmem_drop_pages(const struct kvm_memory_slot *free,
			struct kvm *kvm, bool skip_page_out) { }

static inline int  kvmppc_uvmem_memslot_create(struct kvm *kvm,
		const struct kvm_memory_slot *new)
{
	return H_UNSUPPORTED;
}

static inline void  kvmppc_uvmem_memslot_delete(struct kvm *kvm,
		const struct kvm_memory_slot *old) { }

#endif /* CONFIG_PPC_UV */
#endif /* __ASM_KVM_BOOK3S_UVMEM_H__ */
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ enum xlate_readwrite {
};

extern int kvmppc_vcpu_run(struct kvm_vcpu *vcpu);
extern int __kvmppc_vcpu_run(struct kvm_run *run, struct kvm_vcpu *vcpu);
extern int __kvmppc_vcpu_run(struct kvm_vcpu *vcpu);
extern void kvmppc_handler_highmem(void);

extern void kvmppc_dump_vcpu(struct kvm_vcpu *vcpu);
+3 −1
Original line number Diff line number Diff line
@@ -474,7 +474,8 @@
#ifndef SPRN_LPID
#define SPRN_LPID	0x13F	/* Logical Partition Identifier */
#endif
#define   LPID_RSVD	0x3ff		/* Reserved LPID for partn switching */
#define   LPID_RSVD_POWER7	0x3ff	/* Reserved LPID for partn switching */
#define   LPID_RSVD		0xfff	/* Reserved LPID for partn switching */
#define	SPRN_HMER	0x150	/* Hypervisor maintenance exception reg */
#define   HMER_DEBUG_TRIG	(1ul << (63 - 17)) /* Debug trigger */
#define	SPRN_HMEER	0x151	/* Hyp maintenance exception enable reg */
@@ -1362,6 +1363,7 @@
#define PVR_ARCH_206p	0x0f100003
#define PVR_ARCH_207	0x0f000004
#define PVR_ARCH_300	0x0f000005
#define PVR_ARCH_31	0x0f000006

/* Macros for setting and retrieving special purpose registers */
#ifndef __ASSEMBLY__
+6 −2
Original line number Diff line number Diff line
@@ -260,11 +260,15 @@ int kvmppc_mmu_hv_init(void)
	if (!mmu_has_feature(MMU_FTR_LOCKLESS_TLBIE))
		return -EINVAL;

	/* POWER7 has 10-bit LPIDs (12-bit in POWER8) */
	host_lpid = 0;
	if (cpu_has_feature(CPU_FTR_HVMODE))
		host_lpid = mfspr(SPRN_LPID);

	/* POWER8 and above have 12-bit LPIDs (10-bit in POWER7) */
	if (cpu_has_feature(CPU_FTR_ARCH_207S))
		rsvd_lpid = LPID_RSVD;
	else
		rsvd_lpid = LPID_RSVD_POWER7;

	kvmppc_init_lpid(rsvd_lpid + 1);

Loading