diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-15 18:00:28 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-15 18:00:28 -0400 |
| commit | 636deed6c0bc137a7c4f4a97ae1fcf0ad75323da (patch) | |
| tree | 7bd27189b8e30e3c1466f7730831a08db65f8646 | |
| parent | aa2e3ac64ace127f403be85aa4d6015b859385f2 (diff) | |
| parent | 4a605bc08e98381d8df61c30a4acb2eac15eb7da (diff) | |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Paolo Bonzini:
"ARM:
- some cleanups
- direct physical timer assignment
- cache sanitization for 32-bit guests
s390:
- interrupt cleanup
- introduction of the Guest Information Block
- preparation for processor subfunctions in cpu models
PPC:
- bug fixes and improvements, especially related to machine checks
and protection keys
x86:
- many, many cleanups, including removing a bunch of MMU code for
unnecessary optimizations
- AVIC fixes
Generic:
- memcg accounting"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (147 commits)
kvm: vmx: fix formatting of a comment
KVM: doc: Document the life cycle of a VM and its resources
MAINTAINERS: Add KVM selftests to existing KVM entry
Revert "KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range()"
KVM: PPC: Book3S: Add count cache flush parameters to kvmppc_get_cpu_char()
KVM: PPC: Fix compilation when KVM is not enabled
KVM: Minor cleanups for kvm_main.c
KVM: s390: add debug logging for cpu model subfunctions
KVM: s390: implement subfunction processor calls
arm64: KVM: Fix architecturally invalid reset value for FPEXC32_EL2
KVM: arm/arm64: Remove unused timer variable
KVM: PPC: Book3S: Improve KVM reference counting
KVM: PPC: Book3S HV: Fix build failure without IOMMU support
Revert "KVM: Eliminate extra function calls in kvm_get_dirty_log_protect()"
x86: kvmguest: use TSC clocksource if invariant TSC is exposed
KVM: Never start grow vCPU halt_poll_ns from value below halt_poll_ns_grow_start
KVM: Expose the initial start value in grow_halt_poll_ns() as a module parameter
KVM: grow_halt_poll_ns() should never shrink vCPU halt_poll_ns
KVM: x86/mmu: Consolidate kvm_mmu_zap_all() and kvm_mmu_zap_mmio_sptes()
KVM: x86/mmu: WARN if zapping a MMIO spte results in zapping children
...
93 files changed, 2623 insertions, 1199 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 356156f5c52d..7de9eee73fcd 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
| @@ -45,6 +45,23 @@ the API. The only supported use is one virtual machine per process, | |||
| 45 | and one vcpu per thread. | 45 | and one vcpu per thread. |
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | It is important to note that althought VM ioctls may only be issued from | ||
| 49 | the process that created the VM, a VM's lifecycle is associated with its | ||
| 50 | file descriptor, not its creator (process). In other words, the VM and | ||
| 51 | its resources, *including the associated address space*, are not freed | ||
| 52 | until the last reference to the VM's file descriptor has been released. | ||
| 53 | For example, if fork() is issued after ioctl(KVM_CREATE_VM), the VM will | ||
| 54 | not be freed until both the parent (original) process and its child have | ||
| 55 | put their references to the VM's file descriptor. | ||
| 56 | |||
| 57 | Because a VM's resources are not freed until the last reference to its | ||
| 58 | file descriptor is released, creating additional references to a VM via | ||
| 59 | via fork(), dup(), etc... without careful consideration is strongly | ||
| 60 | discouraged and may have unwanted side effects, e.g. memory allocated | ||
| 61 | by and on behalf of the VM's process may not be freed/unaccounted when | ||
| 62 | the VM is shut down. | ||
| 63 | |||
| 64 | |||
| 48 | 3. Extensions | 65 | 3. Extensions |
| 49 | ------------- | 66 | ------------- |
| 50 | 67 | ||
diff --git a/Documentation/virtual/kvm/halt-polling.txt b/Documentation/virtual/kvm/halt-polling.txt index 4a8418318769..4f791b128dd2 100644 --- a/Documentation/virtual/kvm/halt-polling.txt +++ b/Documentation/virtual/kvm/halt-polling.txt | |||
| @@ -53,7 +53,8 @@ the global max polling interval then the polling interval can be increased in | |||
| 53 | the hope that next time during the longer polling interval the wake up source | 53 | the hope that next time during the longer polling interval the wake up source |
| 54 | will be received while the host is polling and the latency benefits will be | 54 | will be received while the host is polling and the latency benefits will be |
| 55 | received. The polling interval is grown in the function grow_halt_poll_ns() and | 55 | received. The polling interval is grown in the function grow_halt_poll_ns() and |
| 56 | is multiplied by the module parameter halt_poll_ns_grow. | 56 | is multiplied by the module parameters halt_poll_ns_grow and |
| 57 | halt_poll_ns_grow_start. | ||
| 57 | 58 | ||
| 58 | In the event that the total block time was greater than the global max polling | 59 | In the event that the total block time was greater than the global max polling |
| 59 | interval then the host will never poll for long enough (limited by the global | 60 | interval then the host will never poll for long enough (limited by the global |
| @@ -80,22 +81,30 @@ shrunk. These variables are defined in include/linux/kvm_host.h and as module | |||
| 80 | parameters in virt/kvm/kvm_main.c, or arch/powerpc/kvm/book3s_hv.c in the | 81 | parameters in virt/kvm/kvm_main.c, or arch/powerpc/kvm/book3s_hv.c in the |
| 81 | powerpc kvm-hv case. | 82 | powerpc kvm-hv case. |
| 82 | 83 | ||
| 83 | Module Parameter | Description | Default Value | 84 | Module Parameter | Description | Default Value |
| 84 | -------------------------------------------------------------------------------- | 85 | ------------------------------------------ |
