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: "First round of KVM updates for 3.14; PPC parts will come next week. Nothing major here, just bugfixes all over the place. The most interesting part is the ARM guys' virtualized interrupt controller overhaul, which lets userspace get/set the state and thus enables migration of ARM VMs" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (67 commits) kvm: make KVM_MMU_AUDIT help text more readable KVM: s390: Fix memory access error detection KVM: nVMX: Update guest activity state field on L2 exits KVM: nVMX: Fix nested_run_pending on activity state HLT KVM: nVMX: Clean up handling of VMX-related MSRs KVM: nVMX: Add tracepoints for nested_vmexit and nested_vmexit_inject KVM: nVMX: Pass vmexit parameters to nested_vmx_vmexit KVM: nVMX: Leave VMX mode on clearing of feature control MSR KVM: VMX: Fix DR6 update on #DB exception KVM: SVM: Fix reading of DR6 KVM: x86: Sync DR7 on KVM_SET_DEBUGREGS add support for Hyper-V reference time counter KVM: remove useless write to vcpu->hv_clock.tsc_timestamp KVM: x86: fix tsc catchup issue with tsc scaling KVM: x86: limit PIT timer frequency KVM: x86: handle invalid root_hpa everywhere kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub kvm: vfio: silence GCC warning KVM: ARM: Remove duplicate include arm/arm64: KVM: relax the requirements of VMA alignment for THP ...
- Loading branch information
Showing
55 changed files
with
1,515 additions
and
406 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
ARM Virtual Generic Interrupt Controller (VGIC) | ||
=============================================== | ||
|
||
Device types supported: | ||
KVM_DEV_TYPE_ARM_VGIC_V2 ARM Generic Interrupt Controller v2.0 | ||
|
||
Only one VGIC instance may be instantiated through either this API or the | ||
legacy KVM_CREATE_IRQCHIP api. The created VGIC will act as the VM interrupt | ||
controller, requiring emulated user-space devices to inject interrupts to the | ||
VGIC instead of directly to CPUs. | ||
|
||
Groups: | ||
KVM_DEV_ARM_VGIC_GRP_ADDR | ||
Attributes: | ||
KVM_VGIC_V2_ADDR_TYPE_DIST (rw, 64-bit) | ||
Base address in the guest physical address space of the GIC distributor | ||
register mappings. | ||
|
||
KVM_VGIC_V2_ADDR_TYPE_CPU (rw, 64-bit) | ||
Base address in the guest physical address space of the GIC virtual cpu | ||
interface register mappings. | ||
|
||
KVM_DEV_ARM_VGIC_GRP_DIST_REGS | ||
Attributes: | ||
The attr field of kvm_device_attr encodes two values: | ||
bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | | ||
values: | reserved | cpu id | offset | | ||
|
||
All distributor regs are (rw, 32-bit) | ||
|
||
The offset is relative to the "Distributor base address" as defined in the | ||
GICv2 specs. Getting or setting such a register has the same effect as | ||
reading or writing the register on the actual hardware from the cpu | ||
specified with cpu id field. Note that most distributor fields are not | ||
banked, but return the same value regardless of the cpu id used to access | ||
the register. | ||
Limitations: | ||
- Priorities are not implemented, and registers are RAZ/WI | ||
Errors: | ||
-ENODEV: Getting or setting this register is not yet supported | ||
-EBUSY: One or more VCPUs are running | ||
|
||
KVM_DEV_ARM_VGIC_GRP_CPU_REGS | ||
Attributes: | ||
The attr field of kvm_device_attr encodes two values: | ||
bits: | 63 .... 40 | 39 .. 32 | 31 .... 0 | | ||
values: | reserved | cpu id | offset | | ||
|
||
All CPU interface regs are (rw, 32-bit) | ||
|
||
The offset specifies the offset from the "CPU interface base address" as | ||
defined in the GICv2 specs. Getting or setting such a register has the | ||
same effect as reading or writing the register on the actual hardware. | ||
|
||
The Active Priorities Registers APRn are implementation defined, so we set a | ||
fixed format for our implementation that fits with the model of a "GICv2 | ||
implementation without the security extensions" which we present to the | ||
guest. This interface always exposes four register APR[0-3] describing the | ||
maximum possible 128 preemption levels. The semantics of the register | ||
indicate if any interrupts in a given preemption level are in the active | ||
state by setting the corresponding bit. | ||
|
||
Thus, preemption level X has one or more active interrupts if and only if: | ||
|
||
APRn[X mod 32] == 0b1, where n = X / 32 | ||
|
||
Bits for undefined preemption levels are RAZ/WI. | ||
|
||
Limitations: | ||
- Priorities are not implemented, and registers are RAZ/WI | ||
Errors: | ||
-ENODEV: Getting or setting this register is not yet supported | ||
-EBUSY: One or more VCPUs are running |
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
The s390 DIAGNOSE call on KVM | ||
============================= | ||
|
||
KVM on s390 supports the DIAGNOSE call for making hypercalls, both for | ||
native hypercalls and for selected hypercalls found on other s390 | ||
hypervisors. | ||
|
||
Note that bits are numbered as by the usual s390 convention (most significant | ||
bit on the left). | ||
|
||
|
||
General remarks | ||
--------------- | ||
|
||
DIAGNOSE calls by the guest cause a mandatory intercept. This implies | ||
all supported DIAGNOSE calls need to be handled by either KVM or its | ||
userspace. | ||
|
||
All DIAGNOSE calls supported by KVM use the RS-a format: | ||
|
||
-------------------------------------- | ||
| '83' | R1 | R3 | B2 | D2 | | ||
-------------------------------------- | ||
0 8 12 16 20 31 | ||
|
||
The second-operand address (obtained by the base/displacement calculation) | ||
is not used to address data. Instead, bits 48-63 of this address specify | ||
the function code, and bits 0-47 are ignored. | ||
|
||
The supported DIAGNOSE function codes vary by the userspace used. For | ||
DIAGNOSE function codes not specific to KVM, please refer to the | ||
documentation for the s390 hypervisors defining them. | ||
|
||
|
||
DIAGNOSE function code 'X'500' - KVM virtio functions | ||
----------------------------------------------------- | ||
|
||
If the function code specifies 0x500, various virtio-related functions | ||
are performed. | ||
|
||
General register 1 contains the virtio subfunction code. Supported | ||
virtio subfunctions depend on KVM's userspace. Generally, userspace | ||
provides either s390-virtio (subcodes 0-2) or virtio-ccw (subcode 3). | ||
|
||
Upon completion of the DIAGNOSE instruction, general register 2 contains | ||
the function's return code, which is either a return code or a subcode | ||
specific value. | ||
|
||
Subcode 0 - s390-virtio notification and early console printk | ||
Handled by userspace. | ||
|
||
Subcode 1 - s390-virtio reset | ||
Handled by userspace. | ||
|
||
Subcode 2 - s390-virtio set status | ||
Handled by userspace. | ||
|
||
Subcode 3 - virtio-ccw notification | ||
Handled by either userspace or KVM (ioeventfd case). | ||
|
||
General register 2 contains a subchannel-identification word denoting | ||
the subchannel of the virtio-ccw proxy device to be notified. | ||
|
||
General register 3 contains the number of the virtqueue to be notified. | ||
|
||
General register 4 contains a 64bit identifier for KVM usage (the | ||
kvm_io_bus cookie). If general register 4 does not contain a valid | ||
identifier, it is ignored. | ||
|
||
After completion of the DIAGNOSE call, general register 2 may contain | ||
a 64bit identifier (in the kvm_io_bus cookie case). | ||
|
||
See also the virtio standard for a discussion of this hypercall. | ||
|
||
|
||
DIAGNOSE function code 'X'501 - KVM breakpoint | ||
---------------------------------------------- | ||
|
||
If the function code specifies 0x501, breakpoint functions may be performed. | ||
This function code is handled by userspace. |
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 |
---|---|---|
|
@@ -4915,7 +4915,7 @@ F: include/linux/sunrpc/ | |
F: include/uapi/linux/sunrpc/ | ||
|
||
KERNEL VIRTUAL MACHINE (KVM) | ||
M: Gleb Natapov <gleb@redhat.com> | ||
M: Gleb Natapov <gleb@kernel.org> | ||
M: Paolo Bonzini <[email protected]> | ||
L: [email protected] | ||
W: http://www.linux-kvm.org | ||
|
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.