Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Radim Krčmář:
"Minor fixes for new code, corner cases, and documentation"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed
Documentation/virtual/kvm: Update URL for AMD SEV API specification
KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range()
kvm: sev: Fail KVM_SEV_INIT if already initialized
KVM: validate userspace input in kvm_clear_dirty_log_protect()
KVM: x86: Fix bit shifting in update_intel_pt_cfg

+14 -7
+1 -1
Documentation/virtual/kvm/amd-memory-encryption.rst
··· 242 242 ========== 243 243 244 244 .. [white-paper] http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf 245 - .. [api-spec] http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf 245 + .. [api-spec] http://support.amd.com/TechDocs/55766_SEV-KM_API_Specification.pdf 246 246 .. [amd-apm] http://support.amd.com/TechDocs/24593.pdf (section 15.34) 247 247 .. [kvm-forum] http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf
+3
arch/x86/kvm/svm.c
··· 6278 6278 int asid, ret; 6279 6279 6280 6280 ret = -EBUSY; 6281 + if (unlikely(sev->active)) 6282 + return ret; 6283 + 6281 6284 asid = sev_asid_new(); 6282 6285 if (asid < 0) 6283 6286 return ret;
+1 -2
arch/x86/kvm/vmx/nested.c
··· 4540 4540 * given physical address won't match the required 4541 4541 * VMCS12_REVISION identifier. 4542 4542 */ 4543 - nested_vmx_failValid(vcpu, 4543 + return nested_vmx_failValid(vcpu, 4544 4544 VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID); 4545 - return kvm_skip_emulated_instruction(vcpu); 4546 4545 } 4547 4546 new_vmcs12 = kmap(page); 4548 4547 if (new_vmcs12->hdr.revision_id != VMCS12_REVISION ||
+2 -2
arch/x86/kvm/vmx/vmx.c
··· 453 453 struct kvm_tlb_range *range) 454 454 { 455 455 struct kvm_vcpu *vcpu; 456 - int ret = -ENOTSUPP, i; 456 + int ret = 0, i; 457 457 458 458 spin_lock(&to_kvm_vmx(kvm)->ept_pointer_lock); 459 459 ··· 7044 7044 7045 7045 /* unmask address range configure area */ 7046 7046 for (i = 0; i < vmx->pt_desc.addr_range; i++) 7047 - vmx->pt_desc.ctl_bitmask &= ~(0xf << (32 + i * 4)); 7047 + vmx->pt_desc.ctl_bitmask &= ~(0xfULL << (32 + i * 4)); 7048 7048 } 7049 7049 7050 7050 static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
+7 -2
virt/kvm/kvm_main.c
··· 1227 1227 { 1228 1228 struct kvm_memslots *slots; 1229 1229 struct kvm_memory_slot *memslot; 1230 - int as_id, id, n; 1230 + int as_id, id; 1231 1231 gfn_t offset; 1232 - unsigned long i; 1232 + unsigned long i, n; 1233 1233 unsigned long *dirty_bitmap; 1234 1234 unsigned long *dirty_bitmap_buffer; 1235 1235 ··· 1249 1249 return -ENOENT; 1250 1250 1251 1251 n = kvm_dirty_bitmap_bytes(memslot); 1252 + 1253 + if (log->first_page > memslot->npages || 1254 + log->num_pages > memslot->npages - log->first_page) 1255 + return -EINVAL; 1256 + 1252 1257 *flush = false; 1253 1258 dirty_bitmap_buffer = kvm_second_dirty_bitmap(memslot); 1254 1259 if (copy_from_user(dirty_bitmap_buffer, log->dirty_bitmap, n))