diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-14 19:07:40 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-14 19:07:40 -0400 |
| commit | 1609d7604b847a9820e63393d1a3b6cac7286d40 (patch) | |
| tree | 993914907707ceff9eb965f8c519f0a91f5ab192 /arch/x86/kvm/vmx/nested.c | |
| parent | 1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e (diff) | |
| parent | a9c20bb0206ae9384bd470a6832dd8913730add9 (diff) | |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini:
"The main change here is a revert of reverts. We recently simplified
some code that was thought unnecessary; however, since then KVM has
grown quite a few cond_resched()s and for that reason the simplified
code is prone to livelocks---one CPUs tries to empty a list of guest
page tables while the others keep adding to them. This adds back the
generation-based zapping of guest page tables, which was not
unnecessary after all.
On top of this, there is a fix for a kernel memory leak and a couple
of s390 fixlets as well"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86/mmu: Reintroduce fast invalidate/zap for flushing memslot
KVM: x86: work around leak of uninitialized stack contents
KVM: nVMX: handle page fault in vmread
KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
KVM: s390: kvm_s390_vm_start_migration: check dirty_bitmap before using it as target for memset()
Diffstat (limited to 'arch/x86/kvm/vmx/nested.c')
| -rw-r--r-- | arch/x86/kvm/vmx/nested.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index ced9fba32598..a3cba321b5c5 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c | |||
| @@ -4540,6 +4540,7 @@ static int handle_vmread(struct kvm_vcpu *vcpu) | |||
| 4540 | int len; | 4540 | int len; |
| 4541 | gva_t gva = 0; | 4541 | gva_t gva = 0; |
| 4542 | struct vmcs12 *vmcs12; | 4542 | struct vmcs12 *vmcs12; |
| 4543 | struct x86_exception e; | ||
| 4543 | short offset; | 4544 | short offset; |
| 4544 | 4545 | ||
| 4545 | if (!nested_vmx_check_permission(vcpu)) | 4546 | if (!nested_vmx_check_permission(vcpu)) |
| @@ -4588,7 +4589,8 @@ static int handle_vmread(struct kvm_vcpu *vcpu) | |||
| 4588 | vmx_instruction_info, true, len, &gva)) | 4589 | vmx_instruction_info, true, len, &gva)) |
| 4589 | return 1; | 4590 | return 1; |
| 4590 | /* _system ok, nested_vmx_check_permission has verified cpl=0 */ | 4591 | /* _system ok, nested_vmx_check_permission has verified cpl=0 */ |
| 4591 | kvm_write_guest_virt_system(vcpu, gva, &field_value, len, NULL); | 4592 | if (kvm_write_guest_virt_system(vcpu, gva, &field_value, len, &e)) |
| 4593 | kvm_inject_page_fault(vcpu, &e); | ||
| 4592 | } | 4594 | } |
| 4593 | 4595 | ||
| 4594 | return nested_vmx_succeed(vcpu); | 4596 | return nested_vmx_succeed(vcpu); |
