--- /dev/null
+From foo@baz Mon Jul 3 13:22:16 CEST 2017
+From: Thomas Huth <thuth@redhat.com>
+Date: Tue, 24 Jan 2017 07:28:41 +0100
+Subject: ibmveth: Add a proper check for the availability of the checksum features
+
+From: Thomas Huth <thuth@redhat.com>
+
+
+[ Upstream commit 23d28a859fb847fd7fcfbd31acb3b160abb5d6ae ]
+
+When using the ibmveth driver in a KVM/QEMU based VM, it currently
+always prints out a scary error message like this when it is started:
+
+ ibmveth 71000003 (unregistered net_device): unable to change
+ checksum offload settings. 1 rc=-2 ret_attr=71000003
+
+This happens because the driver always tries to enable the checksum
+offloading without checking for the availability of this feature first.
+QEMU does not support checksum offloading for the spapr-vlan device,
+thus we always get the error message here.
+According to the LoPAPR specification, the "ibm,illan-options" property
+of the corresponding device tree node should be checked first to see
+whether the H_ILLAN_ATTRIUBTES hypercall and thus the checksum offloading
+feature is available. Thus let's do this in the ibmveth driver, too, so
+that the error message is really only limited to cases where something
+goes wrong, and does not occur if the feature is just missing.
+
+Signed-off-by: Thomas Huth <thuth@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/ibm/ibmveth.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/ibm/ibmveth.c
++++ b/drivers/net/ethernet/ibm/ibmveth.c
+@@ -1602,8 +1602,11 @@ static int ibmveth_probe(struct vio_dev
+ netdev->netdev_ops = &ibmveth_netdev_ops;
+ netdev->ethtool_ops = &netdev_ethtool_ops;
+ SET_NETDEV_DEV(netdev, &dev->dev);
+- netdev->hw_features = NETIF_F_SG | NETIF_F_RXCSUM |
+- NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
++ netdev->hw_features = NETIF_F_SG;
++ if (vio_get_attribute(dev, "ibm,illan-options", NULL) != NULL) {
++ netdev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
++ NETIF_F_RXCSUM;
++ }
+
+ netdev->features |= netdev->hw_features;
+
--- /dev/null
+From foo@baz Mon Jul 3 13:22:16 CEST 2017
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Tue, 24 Jan 2017 15:18:29 -0800
+Subject: kernel/panic.c: add missing \n
+
+From: Jiri Slaby <jslaby@suse.cz>
+
+
+[ Upstream commit ff7a28a074ccbea999dadbb58c46212cf90984c6 ]
+
+When a system panics, the "Rebooting in X seconds.." message is never
+printed because it lacks a new line. Fix it.
+
+Link: http://lkml.kernel.org/r/20170119114751.2724-1-jslaby@suse.cz
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/panic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -167,7 +167,7 @@ void panic(const char *fmt, ...)
+ * Delay timeout seconds before rebooting the machine.
+ * We can't use the "normal" timers since we just panicked.
+ */
+- pr_emerg("Rebooting in %d seconds..", panic_timeout);
++ pr_emerg("Rebooting in %d seconds..\n", panic_timeout);
+
+ for (i = 0; i < panic_timeout * 1000; i += PANIC_TIMER_STEP) {
+ touch_nmi_watchdog();
amd-xgbe-check-xgbe_init-return-code.patch
net-dsa-check-return-value-of-phy_connect_direct.patch
drm-amdgpu-check-ring-being-ready-before-using.patch
+vfio-spapr-fail-tce_iommu_attach_group-when-iommu_data-is-null.patch
+virtio_net-fix-page_size-64k.patch
+vxlan-do-not-age-static-remote-mac-entries.patch
+ibmveth-add-a-proper-check-for-the-availability-of-the-checksum-features.patch
+kernel-panic.c-add-missing-n.patch
--- /dev/null
+From foo@baz Mon Jul 3 13:22:16 CEST 2017
+From: Greg Kurz <groug@kaod.org>
+Date: Tue, 24 Jan 2017 17:50:26 +0100
+Subject: vfio/spapr: fail tce_iommu_attach_group() when iommu_data is null
+
+From: Greg Kurz <groug@kaod.org>
+
+
+[ Upstream commit bd00fdf198e2da475a2f4265a83686ab42d998a8 ]
+
+The recently added mediated VFIO driver doesn't know about powerpc iommu.
+It thus doesn't register a struct iommu_table_group in the iommu group
+upon device creation. The iommu_data pointer hence remains null.
+
+This causes a kernel oops when userspace tries to set the iommu type of a
+container associated with a mediated device to VFIO_SPAPR_TCE_v2_IOMMU.
+
+[ 82.585440] mtty mtty: MDEV: Registered
+[ 87.655522] iommu: Adding device 83b8f4f2-509f-382f-3c1e-e6bfe0fa1001 to group 10
+[ 87.655527] vfio_mdev 83b8f4f2-509f-382f-3c1e-e6bfe0fa1001: MDEV: group_id = 10
+[ 116.297184] Unable to handle kernel paging request for data at address 0x00000030
+[ 116.297389] Faulting instruction address: 0xd000000007870524
+[ 116.297465] Oops: Kernel access of bad area, sig: 11 [#1]
+[ 116.297611] SMP NR_CPUS=2048
+[ 116.297611] NUMA
+[ 116.297627] PowerNV
+...
+[ 116.297954] CPU: 33 PID: 7067 Comm: qemu-system-ppc Not tainted 4.10.0-rc5-mdev-test #8
+[ 116.297993] task: c000000e7718b680 task.stack: c000000e77214000
+[ 116.298025] NIP: d000000007870524 LR: d000000007870518 CTR: 0000000000000000
+[ 116.298064] REGS: c000000e77217990 TRAP: 0300 Not tainted (4.10.0-rc5-mdev-test)
+[ 116.298103] MSR: 9000000000009033 <SF,HV,EE,ME,IR,DR,RI,LE>
+[ 116.298107] CR: 84004444 XER: 00000000
+[ 116.298154] CFAR: c00000000000888c DAR: 0000000000000030 DSISR: 40000000 SOFTE: 1
+ GPR00: d000000007870518 c000000e77217c10 d00000000787b0ed c000000eed2103c0
+ GPR04: 0000000000000000 0000000000000000 c000000eed2103e0 0000000f24320000
+ GPR08: 0000000000000104 0000000000000001 0000000000000000 d0000000078729b0
+ GPR12: c00000000025b7e0 c00000000fe08400 0000000000000001 000001002d31d100
+ GPR16: 000001002c22c850 00003ffff315c750 0000000043145680 0000000043141bc0
+ GPR20: ffffffffffffffed fffffffffffff000 0000000020003b65 d000000007706018
+ GPR24: c000000f16cf0d98 d000000007706000 c000000003f42980 c000000003f42980
+ GPR28: c000000f1575ac00 c000000003f429c8 0000000000000000 c000000eed2103c0
+[ 116.298504] NIP [d000000007870524] tce_iommu_attach_group+0x10c/0x360 [vfio_iommu_spapr_tce]
+[ 116.298555] LR [d000000007870518] tce_iommu_attach_group+0x100/0x360 [vfio_iommu_spapr_tce]
+[ 116.298601] Call Trace:
+[ 116.298610] [c000000e77217c10] [d000000007870518] tce_iommu_attach_group+0x100/0x360 [vfio_iommu_spapr_tce] (unreliable)
+[ 116.298671] [c000000e77217cb0] [d0000000077033a0] vfio_fops_unl_ioctl+0x278/0x3e0 [vfio]
+[ 116.298713] [c000000e77217d40] [c0000000002a3ebc] do_vfs_ioctl+0xcc/0x8b0
+[ 116.298745] [c000000e77217de0] [c0000000002a4700] SyS_ioctl+0x60/0xc0
+[ 116.298782] [c000000e77217e30] [c00000000000b220] system_call+0x38/0xfc
+[ 116.298812] Instruction dump:
+[ 116.298828] 7d3f4b78 409effc8 3d220000 e9298020 3c800140 38a00018 608480c0 e8690028
+[ 116.298869] 4800249d e8410018 7c7f1b79 41820230 <e93e0030> 2fa90000 419e0114 e9090020
+[ 116.298914] ---[ end trace 1e10b0ced08b9120 ]---
+
+This patch fixes the oops.
+
+Reported-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
+Signed-off-by: Greg Kurz <groug@kaod.org>
+Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/vfio/vfio_iommu_spapr_tce.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/vfio/vfio_iommu_spapr_tce.c
++++ b/drivers/vfio/vfio_iommu_spapr_tce.c
+@@ -1163,6 +1163,10 @@ static int tce_iommu_attach_group(void *
+ /* pr_debug("tce_vfio: Attaching group #%u to iommu %p\n",
+ iommu_group_id(iommu_group), iommu_group); */
+ table_group = iommu_group_get_iommudata(iommu_group);
++ if (!table_group) {
++ ret = -ENODEV;
++ goto unlock_exit;
++ }
+
+ if (tce_groups_attached(container) && (!table_group->ops ||
+ !table_group->ops->take_ownership ||
--- /dev/null
+From foo@baz Mon Jul 3 13:22:16 CEST 2017
+From: "Michael S. Tsirkin" <mst@redhat.com>
+Date: Mon, 23 Jan 2017 21:37:52 +0200
+Subject: virtio_net: fix PAGE_SIZE > 64k
+
+From: "Michael S. Tsirkin" <mst@redhat.com>
+
+
+[ Upstream commit d0fa28f00052391b5df328f502fbbdd4444938b7 ]
+
+I don't have any guests with PAGE_SIZE > 64k but the
+code seems to be clearly broken in that case
+as PAGE_SIZE / MERGEABLE_BUFFER_ALIGN will need
+more than 8 bit and so the code in mergeable_ctx_to_buf_address
+does not give us the actual true size.
+
+Cc: John Fastabend <john.fastabend@gmail.com>
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/virtio_net.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -47,8 +47,16 @@ module_param(gso, bool, 0444);
+ */
+ DECLARE_EWMA(pkt_len, 1, 64)
+
++/* With mergeable buffers we align buffer address and use the low bits to
++ * encode its true size. Buffer size is up to 1 page so we need to align to
++ * square root of page size to ensure we reserve enough bits to encode the true
++ * size.
++ */
++#define MERGEABLE_BUFFER_MIN_ALIGN_SHIFT ((PAGE_SHIFT + 1) / 2)
++
+ /* Minimum alignment for mergeable packet buffers. */
+-#define MERGEABLE_BUFFER_ALIGN max(L1_CACHE_BYTES, 256)
++#define MERGEABLE_BUFFER_ALIGN max(L1_CACHE_BYTES, \
++ 1 << MERGEABLE_BUFFER_MIN_ALIGN_SHIFT)
+
+ #define VIRTNET_DRIVER_VERSION "1.0.0"
+
--- /dev/null
+From foo@baz Mon Jul 3 13:22:16 CEST 2017
+From: Balakrishnan Raman <ramanb@cumulusnetworks.com>
+Date: Mon, 23 Jan 2017 20:44:33 -0800
+Subject: vxlan: do not age static remote mac entries
+
+From: Balakrishnan Raman <ramanb@cumulusnetworks.com>
+
+
+[ Upstream commit efb5f68f32995c146944a9d4257c3cf8eae2c4a1 ]
+
+Mac aging is applicable only for dynamically learnt remote mac
+entries. Check for user configured static remote mac entries
+and skip aging.
+
+Signed-off-by: Balakrishnan Raman <ramanb@cumulusnetworks.com>
+Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/vxlan.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/vxlan.c
++++ b/drivers/net/vxlan.c
+@@ -2240,7 +2240,7 @@ static void vxlan_cleanup(unsigned long
+ = container_of(p, struct vxlan_fdb, hlist);
+ unsigned long timeout;
+
+- if (f->state & NUD_PERMANENT)
++ if (f->state & (NUD_PERMANENT | NUD_NOARP))
+ continue;
+
+ timeout = f->used + vxlan->cfg.age_interval * HZ;