forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Paolo Bonzini: "ARM: - HYP mode stub supports kexec/kdump on 32-bit - improved PMU support - virtual interrupt controller performance improvements - support for userspace virtual interrupt controller (slower, but necessary for KVM on the weird Broadcom SoCs used by the Raspberry Pi 3) MIPS: - basic support for hardware virtualization (ImgTec P5600/P6600/I6400 and Cavium Octeon III) PPC: - in-kernel acceleration for VFIO s390: - support for guests without storage keys - adapter interruption suppression x86: - usual range of nVMX improvements, notably nested EPT support for accessed and dirty bits - emulation of CPL3 CPUID faulting generic: - first part of VCPU thread request API - kvm_stat improvements" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (227 commits) kvm: nVMX: Don't validate disabled secondary controls KVM: put back #ifndef CONFIG_S390 around kvm_vcpu_kick Revert "KVM: Support vCPU-based gfn->hva cache" tools/kvm: fix top level makefile KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING KVM: Documentation: remove VM mmap documentation kvm: nVMX: Remove superfluous VMX instruction fault checks KVM: x86: fix emulation of RSM and IRET instructions KVM: mark requests that need synchronization KVM: return if kvm_vcpu_wake_up() did wake up the VCPU KVM: add explicit barrier to kvm_vcpu_kick KVM: perform a wake_up in kvm_make_all_cpus_request KVM: mark requests that do not need a wakeup KVM: remove #ifndef CONFIG_S390 around kvm_vcpu_wake_up KVM: x86: always use kvm_make_request instead of set_bit KVM: add kvm_{test,clear}_request to replace {test,clear}_bit s390: kvm: Cpu model support for msa6, msa7 and msa8 KVM: x86: remove irq disablement around KVM_SET_CLOCK/KVM_GET_CLOCK kvm: better MWAIT emulation for guests KVM: x86: virtualize cpuid faulting ...
- Loading branch information
Showing
150 changed files
with
9,189 additions
and
3,843 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
* Internal ABI between the kernel and HYP | ||
|
||
This file documents the interaction between the Linux kernel and the | ||
hypervisor layer when running Linux as a hypervisor (for example | ||
KVM). It doesn't cover the interaction of the kernel with the | ||
hypervisor when running as a guest (under Xen, KVM or any other | ||
hypervisor), or any hypervisor-specific interaction when the kernel is | ||
used as a host. | ||
|
||
On arm and arm64 (without VHE), the kernel doesn't run in hypervisor | ||
mode, but still needs to interact with it, allowing a built-in | ||
hypervisor to be either installed or torn down. | ||
|
||
In order to achieve this, the kernel must be booted at HYP (arm) or | ||
EL2 (arm64), allowing it to install a set of stubs before dropping to | ||
SVC/EL1. These stubs are accessible by using a 'hvc #0' instruction, | ||
and only act on individual CPUs. | ||
|
||
Unless specified otherwise, any built-in hypervisor must implement | ||
these functions (see arch/arm{,64}/include/asm/virt.h): | ||
|
||
* r0/x0 = HVC_SET_VECTORS | ||
r1/x1 = vectors | ||
|
||
Set HVBAR/VBAR_EL2 to 'vectors' to enable a hypervisor. 'vectors' | ||
must be a physical address, and respect the alignment requirements | ||
of the architecture. Only implemented by the initial stubs, not by | ||
Linux hypervisors. | ||
|
||
* r0/x0 = HVC_RESET_VECTORS | ||
|
||
Turn HYP/EL2 MMU off, and reset HVBAR/VBAR_EL2 to the initials | ||
stubs' exception vector value. This effectively disables an existing | ||
hypervisor. | ||
|
||
* r0/x0 = HVC_SOFT_RESTART | ||
r1/x1 = restart address | ||
x2 = x0's value when entering the next payload (arm64) | ||
x3 = x1's value when entering the next payload (arm64) | ||
x4 = x2's value when entering the next payload (arm64) | ||
|
||
Mask all exceptions, disable the MMU, move the arguments into place | ||
(arm64 only), and jump to the restart address while at HYP/EL2. This | ||
hypercall is not expected to return to its caller. | ||
|
||
Any other value of r0/x0 triggers a hypervisor-specific handling, | ||
which is not documented here. | ||
|
||
The return value of a stub hypercall is held by r0/x0, and is 0 on | ||
success, and HVC_STUB_ERR on error. A stub hypercall is allowed to | ||
clobber any of the caller-saved registers (x0-x18 on arm64, r0-r3 and | ||
ip on arm). It is thus recommended to use a function call to perform | ||
the hypercall. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.