kernel: bump 4.14 to 4.14.156
[openwrt/staging/wigyori.git] / target / linux / layerscape / patches-4.14 / 810-kvm-support-layerscape.patch
index 07bfef9cf2b1c32405739b55f719714d54b91350..470aa683fabe5994025ba5d1d978ce83f453ca0b 100644 (file)
@@ -74,7 +74,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
        kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_DECREMENTER);
 --- a/virt/kvm/arm/mmu.c
 +++ b/virt/kvm/arm/mmu.c
-@@ -1027,9 +1027,11 @@ static int stage2_pmdp_test_and_clear_yo
+@@ -1028,9 +1028,11 @@ static int stage2_pmdp_test_and_clear_yo
   * @guest_ipa:        The IPA at which to insert the mapping
   * @pa:               The physical address of the device
   * @size:     The size of the mapping
@@ -87,7 +87,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
  {
        phys_addr_t addr, end;
        int ret = 0;
-@@ -1040,7 +1042,7 @@ int kvm_phys_addr_ioremap(struct kvm *kv
+@@ -1041,7 +1043,7 @@ int kvm_phys_addr_ioremap(struct kvm *kv
        pfn = __phys_to_pfn(pa);
  
        for (addr = guest_ipa; addr < end; addr += PAGE_SIZE) {
@@ -96,7 +96,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
  
                if (writable)
                        pte = kvm_s2pte_mkwrite(pte);
-@@ -1064,6 +1066,30 @@ out:
+@@ -1065,6 +1067,30 @@ out:
        return ret;
  }
  
@@ -127,7 +127,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
  static bool transparent_hugepage_adjust(kvm_pfn_t *pfnp, phys_addr_t *ipap)
  {
        kvm_pfn_t pfn = *pfnp;
-@@ -1334,6 +1360,18 @@ static int user_mem_abort(struct kvm_vcp
+@@ -1341,6 +1367,18 @@ static int user_mem_abort(struct kvm_vcp
                hugetlb = true;
                gfn = (fault_ipa & PMD_MASK) >> PAGE_SHIFT;
        } else {
@@ -146,7 +146,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
                /*
                 * Pages belonging to memslots that don't have the same
                 * alignment for userspace and IPA cannot be mapped using
-@@ -1375,6 +1413,11 @@ static int user_mem_abort(struct kvm_vcp
+@@ -1382,6 +1420,11 @@ static int user_mem_abort(struct kvm_vcp
        if (is_error_noslot_pfn(pfn))
                return -EFAULT;
  
@@ -158,7 +158,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
        if (kvm_is_device_pfn(pfn)) {
                mem_type = PAGE_S2_DEVICE;
                flags |= KVM_S2PTE_FLAG_IS_IOMAP;
-@@ -1911,6 +1954,9 @@ int kvm_arch_prepare_memory_region(struc
+@@ -1918,6 +1961,9 @@ int kvm_arch_prepare_memory_region(struc
                        gpa_t gpa = mem->guest_phys_addr +
                                    (vm_start - mem->userspace_addr);
                        phys_addr_t pa;
@@ -168,7 +168,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
  
                        pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT;
                        pa += vm_start - vma->vm_start;
-@@ -1921,9 +1967,13 @@ int kvm_arch_prepare_memory_region(struc
+@@ -1928,9 +1974,13 @@ int kvm_arch_prepare_memory_region(struc
                                goto out;
                        }
  
@@ -196,7 +196,7 @@ Signed-off-by: Signed-off-by: Biwen Li <biwen.li@nxp.com>
  
 --- a/virt/kvm/arm/vgic/vgic-v2.c
 +++ b/virt/kvm/arm/vgic/vgic-v2.c
-@@ -304,7 +304,8 @@ int vgic_v2_map_resources(struct kvm *kv
+@@ -307,7 +307,8 @@ int vgic_v2_map_resources(struct kvm *kv
        if (!static_branch_unlikely(&vgic_v2_cpuif_trap)) {
                ret = kvm_phys_addr_ioremap(kvm, dist->vgic_cpu_base,
                                            kvm_vgic_global_state.vcpu_base,