Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) =================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) The PPC KVM paravirtual interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) =================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) The basic execution principle by which KVM on PowerPC works is to run all kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) space code in PR=1 which is user space. This way we trap all privileged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) instructions and can emulate them accordingly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) Unfortunately that is also the downfall. There are quite some privileged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) instructions that needlessly return us to the hypervisor even though they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) could be handled differently.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) This is what the PPC PV interface helps with. It takes privileged instructions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) and transforms them into unprivileged ones with some help from the hypervisor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) This cuts down virtualization costs by about 50% on some of my benchmarks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) The code for that interface can be found in arch/powerpc/kernel/kvm*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) Querying for existence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) To find out if we're running on KVM or not, we leverage the device tree. When
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) Linux is running on KVM, a node /hypervisor exists. That node contains a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) compatible property with the value "linux,kvm".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) Once you determined you're running under a PV capable KVM, you can now use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) hypercalls as described below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) KVM hypercalls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) Inside the device tree's /hypervisor node there's a property called
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 'hypercall-instructions'. This property contains at most 4 opcodes that make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) up the hypercall. To call a hypercall, just call these instructions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) The parameters are as follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)         ========	================	================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	Register	IN			OUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)         ========	================	================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	r0		-			volatile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	r3		1st parameter		Return code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	r4		2nd parameter		1st output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	r5		3rd parameter		2nd output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	r6		4th parameter		3rd output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	r7		5th parameter		4th output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	r8		6th parameter		5th output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	r9		7th parameter		6th output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	r10		8th parameter		7th output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	r11		hypercall number	8th output value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	r12		-			volatile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)         ========	================	================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) Hypercall definitions are shared in generic code, so the same hypercall numbers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) apply for x86 and powerpc alike with the exception that each KVM hypercall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) also needs to be ORed with the KVM vendor code which is (42 << 16).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) Return codes can be as follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	====		=========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	Code		Meaning
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	====		=========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	0		Success
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	12		Hypercall not implemented
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	<0		Error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	====		=========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) The magic page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) To enable communication between the hypervisor and guest there is a new shared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) page that contains parts of supervisor visible register state. The guest can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) map this shared page using the KVM hypercall KVM_HC_PPC_MAP_MAGIC_PAGE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) With this hypercall issued the guest always gets the magic page mapped at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) desired location. The first parameter indicates the effective address when the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) MMU is enabled. The second parameter indicates the address in real mode, if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) applicable to the target. For now, we always map the page to -4096. This way we
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) can access it using absolute load and store functions. The following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) instruction reads the first field of the magic page::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	ld	rX, -4096(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) The interface is designed to be extensible should there be need later to add
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) additional registers to the magic page. If you add fields to the magic page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) also define a new hypercall feature to indicate that the host can give you more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) registers. Only if the host supports the additional features, make use of them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) The magic page layout is described by struct kvm_vcpu_arch_shared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) in arch/powerpc/include/asm/kvm_para.h.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) Magic page features
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) ===================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) When mapping the magic page using the KVM hypercall KVM_HC_PPC_MAP_MAGIC_PAGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) a second return value is passed to the guest. This second return value contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) a bitmap of available features inside the magic page.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) The following enhancements to the magic page are currently available:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)   ============================  =======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)   KVM_MAGIC_FEAT_SR		Maps SR registers r/w in the magic page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)   KVM_MAGIC_FEAT_MAS0_TO_SPRG7	Maps MASn, ESR, PIR and high SPRGs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)   ============================  =======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) For enhanced features in the magic page, please check for the existence of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) feature before using them!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Magic page flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) In addition to features that indicate whether a host is capable of a particular
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) feature we also have a channel for a guest to tell the guest whether it's capable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) of something. This is what we call "flags".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) Flags are passed to the host in the low 12 bits of the Effective Address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) The following flags are currently available for a guest to expose:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)   MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correctly wrt magic page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) MSR bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) The MSR contains bits that require hypervisor intervention and bits that do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) not require direct hypervisor intervention because they only get interpreted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) when entering the guest or don't have any impact on the hypervisor's behavior.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) The following bits are safe to be set inside the guest:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)   - MSR_EE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)   - MSR_RI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) If any other bit changes in the MSR, please still use mtmsr(d).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) Patched instructions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) ====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) The "ld" and "std" instructions are transformed to "lwz" and "stw" instructions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) respectively on 32 bit systems with an added offset of 4 to accommodate for big
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) endianness.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) The following is a list of mapping the Linux kernel performs when running as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) guest. Implementing any of those mappings is optional, as the instruction traps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) also act on the shared page. So calling privileged instructions still works as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) before.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) ======================= ================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) From			To
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) ======================= ================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) mfmsr	rX		ld	rX, magic_page->msr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) mfsprg	rX, 0		ld	rX, magic_page->sprg0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) mfsprg	rX, 1		ld	rX, magic_page->sprg1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) mfsprg	rX, 2		ld	rX, magic_page->sprg2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) mfsprg	rX, 3		ld	rX, magic_page->sprg3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) mfsrr0	rX		ld	rX, magic_page->srr0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) mfsrr1	rX		ld	rX, magic_page->srr1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) mfdar	rX		ld	rX, magic_page->dar
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) mfdsisr	rX		lwz	rX, magic_page->dsisr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) mtmsr	rX		std	rX, magic_page->msr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) mtsprg	0, rX		std	rX, magic_page->sprg0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) mtsprg	1, rX		std	rX, magic_page->sprg1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) mtsprg	2, rX		std	rX, magic_page->sprg2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) mtsprg	3, rX		std	rX, magic_page->sprg3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) mtsrr0	rX		std	rX, magic_page->srr0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) mtsrr1	rX		std	rX, magic_page->srr1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) mtdar	rX		std	rX, magic_page->dar
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) mtdsisr	rX		stw	rX, magic_page->dsisr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) tlbsync			nop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) mtmsrd	rX, 0		b	<special mtmsr section>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) mtmsr	rX		b	<special mtmsr section>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) mtmsrd	rX, 1		b	<special mtmsrd section>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) [Book3S only]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) mtsrin	rX, rY		b	<special mtsrin section>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) [BookE only]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) wrteei	[0|1]		b	<special wrteei section>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) ======================= ================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) Some instructions require more logic to determine what's going on than a load
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) or store instruction can deliver. To enable patching of those, we keep some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) RAM around where we can live translate instructions to. What happens is the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) following:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	1) copy emulation code to memory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	2) patch that code to fit the emulated instruction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	3) patch that code to return to the original pc + 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	4) patch the original instruction to branch to the new code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) That way we can inject an arbitrary amount of code as replacement for a single
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) instruction. This allows us to check for pending interrupts when setting EE=1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) for example.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) Hypercall ABIs in KVM on PowerPC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) =================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 1) KVM hypercalls (ePAPR)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) These are ePAPR compliant hypercall implementation (mentioned above). Even
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) generic hypercalls are implemented here, like the ePAPR idle hcall. These are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) available on all targets.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 2) PAPR hypercalls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) PAPR hypercalls are needed to run server PowerPC PAPR guests (-M pseries in QEMU).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) These are the same hypercalls that pHyp, the POWER hypervisor implements. Some of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) them are handled in the kernel, some are handled in user space. This is only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) available on book3s_64.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 3) OSI hypercalls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) Mac-on-Linux is another user of KVM on PowerPC, which has its own hypercall (long
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) before KVM). This is supported to maintain compatibility. All these hypercalls get
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) forwarded to user space. This is only useful on book3s_32, but can be used with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) book3s_64 as well.