[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 71/79] virtio-net: fix offload ctrl endian
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 71/79] virtio-net: fix offload ctrl endian |
Date: |
Mon, 28 Aug 2017 19:14:46 -0500 |
From: Jason Wang <address@hidden>
Spec said offloads should be le64, so use virtio_ldq_p() to guarantee
valid endian.
Fixes: 644c98587d4c ("virtio-net: dynamic network offloads configuration")
Cc: address@hidden
Cc: Dmitry Fleytman <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
(cherry picked from commit 189ae6bb5ce1f5a322f8691d00fe942ba43dd601)
Signed-off-by: Michael Roth <address@hidden>
---
hw/net/virtio-net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 98bd683..7695f75 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -723,6 +723,8 @@ static int virtio_net_handle_offloads(VirtIONet *n, uint8_t
cmd,
if (cmd == VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET) {
uint64_t supported_offloads;
+ offloads = virtio_ldq_p(vdev, &offloads);
+
if (!n->has_vnet_hdr) {
return VIRTIO_NET_ERR;
}
--
2.7.4
- [Qemu-stable] [PATCH 05/79] qemu-img/convert: Move bs_n > 1 && -B check down, (continued)
- [Qemu-stable] [PATCH 05/79] qemu-img/convert: Move bs_n > 1 && -B check down, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 65/79] 9pfs: local: remove: use correct path component, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 52/79] target/ppc: pass const string to kvmppc_is_mem_backend_page_size_ok(), Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 56/79] target/xtensa: handle unknown registers in gdbstub, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 67/79] spapr: fix migration to pseries machine < 2.8, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 66/79] hid: Reset kbd modifiers on reset, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 57/79] commit: Fix use after free in completion, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 59/79] nbd: Fix regression on resiliency to port scan, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 68/79] virtio-scsi: finalize IOMMU support, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 73/79] input: Decrement queue count on kbd delay, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 71/79] virtio-net: fix offload ctrl endian,
Michael Roth <=
- [Qemu-stable] [PATCH 74/79] qemu-iotests: Test automatic commit job cancel on hot unplug, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 76/79] cpu: don't allow negative core id, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 64/79] block: Do not strcmp() with NULL uri->scheme, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 69/79] commit: Add NULL check for overlay_bs, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 70/79] spapr: fix memory leak in spapr_core_pre_plug(), Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 07/79] iotests/051: Add test for empty filename, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 06/79] block: An empty filename counts as no filename, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 72/79] input: limit kbd queue depth, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 75/79] block: Skip implicit nodes in query-block/blockstats, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 78/79] block/nfs: fix mutex assertion in nfs_file_close(), Michael Roth, 2017/08/28