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: - GICv4.1 support - 32bit host removal PPC: - secure (encrypted) using under the Protected Execution Framework ultravisor s390: - allow disabling GISA (hardware interrupt injection) and protected VMs/ultravisor support. x86: - New dirty bitmap flag that sets all bits in the bitmap when dirty page logging is enabled; this is faster because it doesn't require bulk modification of the page tables. - Initial work on making nested SVM event injection more similar to VMX, and less buggy. - Various cleanups to MMU code (though the big ones and related optimizations were delayed to 5.8). Instead of using cr3 in function names which occasionally means eptp, KVM too has standardized on "pgd". - A large refactoring of CPUID features, which now use an array that parallels the core x86_features. - Some removal of pointer chasing from kvm_x86_ops, which will also be switched to static calls as soon as they are available. - New Tigerlake CPUID features. - More bugfixes, optimizations and cleanups. Generic: - selftests: cleanups, new MMU notifier stress test, steal-time test - CSV output for kvm_stat" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (277 commits) x86/kvm: fix a missing-prototypes "vmread_error" KVM: x86: Fix BUILD_BUG() in __cpuid_entry_get_reg() w/ CONFIG_UBSAN=y KVM: VMX: Add a trampoline to fix VMREAD error handling KVM: SVM: Annotate svm_x86_ops as __initdata KVM: VMX: Annotate vmx_x86_ops as __initdata KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup() KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes KVM: VMX: Configure runtime hooks using vmx_x86_ops KVM: VMX: Move hardware_setup() definition below vmx_x86_ops KVM: x86: Move init-only kvm_x86_ops to separate struct KVM: Pass kvm_init()'s opaque param to additional arch funcs s390/gmap: return proper error code on ksm unsharing KVM: selftests: Fix cosmetic copy-paste error in vm_mem_region_move() KVM: Fix out of range accesses to memslots KVM: X86: Micro-optimize IPI fastpath delay KVM: X86: Delay read msr data iff writes ICR MSR KVM: PPC: Book3S HV: Add a capability for enabling secure guests KVM: arm64: GICv4.1: Expose HW-based SGIs in debugfs KVM: arm64: GICv4.1: Allow non-trapping WFI when using HW SGIs ...
- Loading branch information
Showing
206 changed files
with
7,867 additions
and
9,698 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ KVM | |
nested-vmx | ||
ppc-pv | ||
s390-diag | ||
s390-pv | ||
s390-pv-boot | ||
timekeeping | ||
vcpu-requests | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 | ||
====================================== | ||
s390 (IBM Z) Boot/IPL of Protected VMs | ||
====================================== | ||
|
||
Summary | ||
------- | ||
The memory of Protected Virtual Machines (PVMs) is not accessible to | ||
I/O or the hypervisor. In those cases where the hypervisor needs to | ||
access the memory of a PVM, that memory must be made accessible. | ||
Memory made accessible to the hypervisor will be encrypted. See | ||
:doc:`s390-pv` for details." | ||
|
||
On IPL (boot) a small plaintext bootloader is started, which provides | ||
information about the encrypted components and necessary metadata to | ||
KVM to decrypt the protected virtual machine. | ||
|
||
Based on this data, KVM will make the protected virtual machine known | ||
to the Ultravisor (UV) and instruct it to secure the memory of the | ||
PVM, decrypt the components and verify the data and address list | ||
hashes, to ensure integrity. Afterwards KVM can run the PVM via the | ||
SIE instruction which the UV will intercept and execute on KVM's | ||
behalf. | ||
|
||
As the guest image is just like an opaque kernel image that does the | ||
switch into PV mode itself, the user can load encrypted guest | ||
executables and data via every available method (network, dasd, scsi, | ||
direct kernel, ...) without the need to change the boot process. | ||
|
||
|
||
Diag308 | ||
------- | ||
This diagnose instruction is the basic mechanism to handle IPL and | ||
related operations for virtual machines. The VM can set and retrieve | ||
IPL information blocks, that specify the IPL method/devices and | ||
request VM memory and subsystem resets, as well as IPLs. | ||
|
||
For PVMs this concept has been extended with new subcodes: | ||
|
||
Subcode 8: Set an IPL Information Block of type 5 (information block | ||
for PVMs) | ||
Subcode 9: Store the saved block in guest memory | ||
Subcode 10: Move into Protected Virtualization mode | ||
|
||
The new PV load-device-specific-parameters field specifies all data | ||
that is necessary to move into PV mode. | ||
|
||
* PV Header origin | ||
* PV Header length | ||
* List of Components composed of | ||
* AES-XTS Tweak prefix | ||
* Origin | ||
* Size | ||
|
||
The PV header contains the keys and hashes, which the UV will use to | ||
decrypt and verify the PV, as well as control flags and a start PSW. | ||
|
||
The components are for instance an encrypted kernel, kernel parameters | ||
and initrd. The components are decrypted by the UV. | ||
|
||
After the initial import of the encrypted data, all defined pages will | ||
contain the guest content. All non-specified pages will start out as | ||
zero pages on first access. | ||
|
||
|
||
When running in protected virtualization mode, some subcodes will result in | ||
exceptions or return error codes. | ||
|
||
Subcodes 4 and 7, which specify operations that do not clear the guest | ||
memory, will result in specification exceptions. This is because the | ||
UV will clear all memory when a secure VM is removed, and therefore | ||
non-clearing IPL subcodes are not allowed. | ||
|
||
Subcodes 8, 9, 10 will result in specification exceptions. | ||
Re-IPL into a protected mode is only possible via a detour into non | ||
protected mode. | ||
|
||
Keys | ||
---- | ||
Every CEC will have a unique public key to enable tooling to build | ||
encrypted images. | ||
See `s390-tools <https://github.com/ibm-s390-tools/s390-tools/>`_ | ||
for the tooling. |
Oops, something went wrong.