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 Paolo Bonzini:
"KVM/ARM fixes:
- Fix per-vcpu vgic bitmap allocation
- Do not give copy random memory on MMIO read
- Fix GICv3 APR register restore order

KVM/x86 fixes:
- Fix ubsan warning
- Fix hardware breakpoints in a guest vs. preempt notifiers
- Fix Hurd

Generic:
- use __GFP_NOWARN together with GFP_NOWAIT"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: x86: MMU: fix ubsan index-out-of-range warning
arm64: KVM: vgic-v3: Restore ICH_APR0Rn_EL2 before ICH_APR1Rn_EL2
KVM: async_pf: do not warn on page allocation failures
KVM: x86: fix conversion of addresses to linear in 32-bit protected mode
KVM: x86: fix missed hardware breakpoints
arm/arm64: KVM: Feed initialized memory to MMIO accesses
KVM: arm/arm64: vgic: Ensure bitmaps are long enough

+19 -17
+2 -1
arch/arm/kvm/mmio.c
··· 206 206 run->mmio.is_write = is_write; 207 207 run->mmio.phys_addr = fault_ipa; 208 208 run->mmio.len = len; 209 - memcpy(run->mmio.data, data_buf, len); 209 + if (is_write) 210 + memcpy(run->mmio.data, data_buf, len); 210 211 211 212 if (!ret) { 212 213 /* We handled the access successfully in the kernel. */
+10 -10
arch/arm64/kvm/hyp/vgic-v3-sr.c
··· 149 149 150 150 switch (nr_pri_bits) { 151 151 case 7: 152 - write_gicreg(cpu_if->vgic_ap1r[3], ICH_AP1R3_EL2); 153 - write_gicreg(cpu_if->vgic_ap1r[2], ICH_AP1R2_EL2); 154 - case 6: 155 - write_gicreg(cpu_if->vgic_ap1r[1], ICH_AP1R1_EL2); 156 - default: 157 - write_gicreg(cpu_if->vgic_ap1r[0], ICH_AP1R0_EL2); 158 - } 159 - 160 - switch (nr_pri_bits) { 161 - case 7: 162 152 write_gicreg(cpu_if->vgic_ap0r[3], ICH_AP0R3_EL2); 163 153 write_gicreg(cpu_if->vgic_ap0r[2], ICH_AP0R2_EL2); 164 154 case 6: 165 155 write_gicreg(cpu_if->vgic_ap0r[1], ICH_AP0R1_EL2); 166 156 default: 167 157 write_gicreg(cpu_if->vgic_ap0r[0], ICH_AP0R0_EL2); 158 + } 159 + 160 + switch (nr_pri_bits) { 161 + case 7: 162 + write_gicreg(cpu_if->vgic_ap1r[3], ICH_AP1R3_EL2); 163 + write_gicreg(cpu_if->vgic_ap1r[2], ICH_AP1R2_EL2); 164 + case 6: 165 + write_gicreg(cpu_if->vgic_ap1r[1], ICH_AP1R1_EL2); 166 + default: 167 + write_gicreg(cpu_if->vgic_ap1r[0], ICH_AP1R0_EL2); 168 168 } 169 169 170 170 switch (max_lr_idx) {
+2 -2
arch/x86/kvm/emulate.c
··· 650 650 u16 sel; 651 651 652 652 la = seg_base(ctxt, addr.seg) + addr.ea; 653 - *linear = la; 654 653 *max_size = 0; 655 654 switch (mode) { 656 655 case X86EMUL_MODE_PROT64: 656 + *linear = la; 657 657 if (is_noncanonical_address(la)) 658 658 goto bad; 659 659 ··· 662 662 goto bad; 663 663 break; 664 664 default: 665 + *linear = la = (u32)la; 665 666 usable = ctxt->ops->get_segment(ctxt, &sel, &desc, NULL, 666 667 addr.seg); 667 668 if (!usable) ··· 690 689 if (size > *max_size) 691 690 goto bad; 692 691 } 693 - la &= (u32)-1; 694 692 break; 695 693 } 696 694 if (insn_aligned(ctxt, size) && ((la & (size - 1)) != 0))
+1 -1
arch/x86/kvm/paging_tmpl.h
··· 249 249 return ret; 250 250 251 251 kvm_vcpu_mark_page_dirty(vcpu, table_gfn); 252 - walker->ptes[level] = pte; 252 + walker->ptes[level - 1] = pte; 253 253 } 254 254 return 0; 255 255 }
+1
arch/x86/kvm/x86.c
··· 2752 2752 } 2753 2753 2754 2754 kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu); 2755 + vcpu->arch.switch_db_regs |= KVM_DEBUGREG_RELOAD; 2755 2756 } 2756 2757 2757 2758 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
+2 -2
virt/kvm/arm/vgic.c
··· 1875 1875 static int vgic_vcpu_init_maps(struct kvm_vcpu *vcpu, int nr_irqs) 1876 1876 { 1877 1877 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; 1878 - 1879 - int sz = (nr_irqs - VGIC_NR_PRIVATE_IRQS) / 8; 1878 + int nr_longs = BITS_TO_LONGS(nr_irqs - VGIC_NR_PRIVATE_IRQS); 1879 + int sz = nr_longs * sizeof(unsigned long); 1880 1880 vgic_cpu->pending_shared = kzalloc(sz, GFP_KERNEL); 1881 1881 vgic_cpu->active_shared = kzalloc(sz, GFP_KERNEL); 1882 1882 vgic_cpu->pend_act_shared = kzalloc(sz, GFP_KERNEL);
+1 -1
virt/kvm/async_pf.c
··· 172 172 * do alloc nowait since if we are going to sleep anyway we 173 173 * may as well sleep faulting in page 174 174 */ 175 - work = kmem_cache_zalloc(async_pf_cache, GFP_NOWAIT); 175 + work = kmem_cache_zalloc(async_pf_cache, GFP_NOWAIT | __GFP_NOWARN); 176 176 if (!work) 177 177 return 0; 178 178