[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 1bfa31: virtio-net: use the backend cross-end
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 1bfa31: virtio-net: use the backend cross-endian capabilit... |
Date: |
Fri, 19 Feb 2016 06:30:05 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 1bfa316ce776d1f90ac96c59b4b69910db19ed6d
https://github.com/qemu/qemu/commit/1bfa316ce776d1f90ac96c59b4b69910db19ed6d
Author: Greg Kurz <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/net/virtio-net.c
M include/hw/virtio/virtio-access.h
M include/hw/virtio/virtio-net.h
Log Message:
-----------
virtio-net: use the backend cross-endian capabilities
When running a fully emulated device in cross-endian conditions, including
a virtio 1.0 device offered to a big endian guest, we need to fix the vnet
headers. This is currently handled by the virtio_net_hdr_swap() function
in the core virtio-net code but it should actually be handled by the net
backend.
With this patch, virtio-net now tries to configure the backend to do the
endian fixing when the device starts (i.e. drivers sets the CONFIG_OK bit).
If the backend cannot support the requested endiannes, we have to fallback
onto virtio_net_hdr_swap(): this is recorded in the needs_vnet_hdr_swap flag,
to be used in the TX and RX paths.
Note that we reset the backend to the default behaviour (guest native
endianness) when the device stops (i.e. device status had CONFIG_OK bit and
driver unsets it). This is needed, with the linux tap backend at least,
otherwise the guest may lose network connectivity if rebooted into a
different endianness.
The current vhost-net code also tries to configure net backends. This will
be no more needed and will be reverted in a subsequent patch.
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Commit: 3154d1e426e8a82730119984b1b25b830830c1d2
https://github.com/qemu/qemu/commit/3154d1e426e8a82730119984b1b25b830830c1d2
Author: Greg Kurz <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/net/vhost_net.c
Log Message:
-----------
vhost-net: revert support of cross-endian vnet headers
Cross-endian is now handled by the core virtio-net code.
This patch reverts:
commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991
vhost-net: tell tap backend about the vnet endianness
and
commit cf0a628f6e81bfc9b7a944fa0b80c3594836df56
net: set endianness on all backend devices
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Commit: a122ab24725c0392d4f53105aff343e703119fbe
https://github.com/qemu/qemu/commit/a122ab24725c0392d4f53105aff343e703119fbe
Author: Greg Kurz <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/virtio/vhost.c
M include/hw/virtio/virtio-access.h
Log Message:
-----------
virtio: move cross-endian helper to vhost
If target is bi-endian (ppc64, arm), the virtio_legacy_is_cross_endian()
indeed returns the runtime state of the virtio device. However, it returns
false unconditionally in the general case. This sounds a bit strange
given the name of the function.
This helper is only useful for vhost actually, where indeed non bi-endian
targets don't have to deal with cross-endian issues.
This patch moves the helper to vhost.c and gives it a more appropriate name.
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Commit: e58481234ef9c132554cc529d9981ebd78fb6903
https://github.com/qemu/qemu/commit/e58481234ef9c132554cc529d9981ebd78fb6903
Author: Greg Kurz <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/virtio/vhost.c
Log Message:
-----------
vhost: move virtio 1.0 check to cross-endian helper
Indeed vhost doesn't need to ask for vring endian fixing if the device is
virtio 1.0, since it is already handled by the in-kernel vhost driver. This
patch simply consolidates the logic into the existing helper.
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Commit: 46f70ff148ae01e2dc96e64c393e295a0092555d
https://github.com/qemu/qemu/commit/46f70ff148ae01e2dc96e64c393e295a0092555d
Author: Greg Kurz <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/virtio/vhost.c
Log Message:
-----------
vhost: simplify vhost_needs_vring_endian()
After the call to virtio_vdev_has_feature(), we only care for legacy
devices, so we don't need the extra check in virtio_is_big_endian().
Also the device_endian field is always set (VIRTIO_DEVICE_ENDIAN_UNKNOWN
may only happen on a virtio_load() path that cannot lead here), so we
don't need the assert() either.
This open codes the device_endian checking in vhost_needs_vring_endian().
It also adds a comment to explain the logic, as recent reviews showed the
cross-endian tweaks aren't that obvious.
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Commit: e5157e313cd9c2d57f28873318d0bb29c77a9b1a
https://github.com/qemu/qemu/commit/e5157e313cd9c2d57f28873318d0bb29c77a9b1a
Author: Greg Kurz <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M include/hw/virtio/virtio-access.h
Log Message:
-----------
virtio: optimize virtio_access_is_big_endian() for little-endian targets
When adding cross-endian support, we introduced the TARGET_IS_BIENDIAN macro
and the virtio_access_is_big_endian() helper to have a branchless fast path
in the virtio memory accessors for targets that don't switch endian.
This was considered as a strong requirement at the time.
Now we have added a runtime check for virtio 1.0, which ruins the benefit
of the virtio_access_is_big_endian() helper for always little-endian targets.
With this patch, always little-endian targets stop checking for virtio 1.0,
since the result is little-endian in all cases.
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Commit: e1e4bf225236a2aea99bedee5a5f7e764841616a
https://github.com/qemu/qemu/commit/e1e4bf225236a2aea99bedee5a5f7e764841616a
Author: Michael S. Tsirkin <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/pci/msix.c
Log Message:
-----------
msix: fix msix_vector_masked
commit 428c3ece97179557f2753071fb0ca97a03437267 ("fix MSI injection on Xen")
inadvertently enabled the xen-specific logic unconditionally.
Limit it to only when xen is enabled.
Additionally, msix data should be read with pci_get_log
since the format is pci little-endian.
Reported-by: "Daniel P. Berrange" <address@hidden>
Cc: Stefano Stabellini <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Commit: 4e082566a9cd17e5f00d0df85a67dc7a086d30b0
https://github.com/qemu/qemu/commit/4e082566a9cd17e5f00d0df85a67dc7a086d30b0
Author: Victor Kaplansky <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M tests/Makefile
M tests/bios-tables-test.c
A tests/boot-sector.c
A tests/boot-sector.h
A tests/pxe-test.c
Log Message:
-----------
tests: add pxe e1000 and virtio-pci tests
The test is based on bios-tables-test.c. It creates a file with
the boot sector image and loads it into a guest using PXE and TFTP
functionality.
Cc: Jason Wang <address@hidden>
Signed-off-by: Victor Kaplansky <address@hidden>
Suggested-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Commit: 33c28f3bde02e6dd69da58f9a8b7e4a50c616849
https://github.com/qemu/qemu/commit/33c28f3bde02e6dd69da58f9a8b7e4a50c616849
Author: Cao jin <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/pci-bridge/dec.c
Log Message:
-----------
dec: convert to realize()
Also because pci_bridge_initfn() can`t fail.
Signed-off-by: Cao jin <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Commit: 9cfaa0079f5053683c6a632070244c35fa319549
https://github.com/qemu/qemu/commit/9cfaa0079f5053683c6a632070244c35fa319549
Author: Cao jin <address@hidden>
Date: 2016-02-16 (Tue, 16 Feb 2016)
Changed paths:
M hw/pci-bridge/i82801b11.c
M hw/pci-bridge/ioh3420.c
M hw/pci-bridge/pci_bridge_dev.c
M hw/pci-bridge/xio3130_downstream.c
M hw/pci-bridge/xio3130_upstream.c
M hw/pci-host/apb.c
M hw/pci/pci_bridge.c
M include/hw/pci/pci_bridge.h
Log Message:
-----------
change type of pci_bridge_initfn() to void
Since it can`t fail. Also modify the callers.
Signed-off-by: Cao jin <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Commit: cefa2bbd6ad516a8cde9425a35597487d9a4becb
https://github.com/qemu/qemu/commit/cefa2bbd6ad516a8cde9425a35597487d9a4becb
Author: Michael S. Tsirkin <address@hidden>
Date: 2016-02-17 (Wed, 17 Feb 2016)
Changed paths:
M rules.mak
Log Message:
-----------
rules: filter out irrelevant files
It's often handy to make executables depend on each other, e.g. make a
test depend on a helper. This doesn't work now, as linker
will attempt to use the helper as an object.
To fix, filter only relevant file types before linking an executable.
Signed-off-by: Michael S. Tsirkin <address@hidden>
Commit: 5669655aafdb88a8797c74a989dd0c0ebb1349fa
https://github.com/qemu/qemu/commit/5669655aafdb88a8797c74a989dd0c0ebb1349fa
Author: Victor Kaplansky <address@hidden>
Date: 2016-02-18 (Thu, 18 Feb 2016)
Changed paths:
M hw/net/vhost_net.c
M hw/virtio/vhost.c
M hw/virtio/virtio-pci.c
M hw/virtio/virtio.c
M include/hw/virtio/virtio.h
Log Message:
-----------
vhost-user interrupt management fixes
Since guest_mask_notifier can not be used in vhost-user mode due
to buffering implied by unix control socket, force
use_mask_notifier on virtio devices of vhost-user interfaces, and
send correct callfd to the guest at vhost start.
Using guest_notifier_mask function in vhost-user case may
break interrupt mask paradigm, because mask/unmask is not
really done when returning from guest_notifier_mask call, instead
message is posted in a unix socket, and processed later.
Add an option boolean flag 'use_mask_notifier' to disable the use
of guest_notifier_mask in virtio pci.
Signed-off-by: Didier Pallard <address@hidden>
Signed-off-by: Victor Kaplansky <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Commit: a28c393cc261afeb4863b05d7c33c2a5fc55ef38
https://github.com/qemu/qemu/commit/a28c393cc261afeb4863b05d7c33c2a5fc55ef38
Author: Victor Kaplansky <address@hidden>
Date: 2016-02-18 (Thu, 18 Feb 2016)
Changed paths:
M tests/vhost-user-bridge.c
Log Message:
-----------
tests/vhost-user-bridge: add scattering of incoming packets
This patch adds to the vubr test the scattering of incoming
packets to the chain of RX buffer. Also, this patch corrects the
size of the header preceding the packet in RX buffers.
Note that this patch doesn't add the support for mergeable
buffers.
Signed-off-by: Victor Kaplansky <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Commit: 09125c5e76923aa22a72f43cb34b6e74ae7fe17f
https://github.com/qemu/qemu/commit/09125c5e76923aa22a72f43cb34b6e74ae7fe17f
Author: Peter Maydell <address@hidden>
Date: 2016-02-19 (Fri, 19 Feb 2016)
Changed paths:
M hw/net/vhost_net.c
M hw/net/virtio-net.c
M hw/pci-bridge/dec.c
M hw/pci-bridge/i82801b11.c
M hw/pci-bridge/ioh3420.c
M hw/pci-bridge/pci_bridge_dev.c
M hw/pci-bridge/xio3130_downstream.c
M hw/pci-bridge/xio3130_upstream.c
M hw/pci-host/apb.c
M hw/pci/msix.c
M hw/pci/pci_bridge.c
M hw/virtio/vhost.c
M hw/virtio/virtio-pci.c
M hw/virtio/virtio.c
M include/hw/pci/pci_bridge.h
M include/hw/virtio/virtio-access.h
M include/hw/virtio/virtio-net.h
M include/hw/virtio/virtio.h
M rules.mak
M tests/Makefile
M tests/bios-tables-test.c
A tests/boot-sector.c
A tests/boot-sector.h
A tests/pxe-test.c
M tests/vhost-user-bridge.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
vhost, virtio, pci, pxe
Fixes all over the place.
New tests for pxe.
Signed-off-by: Michael S. Tsirkin <address@hidden>
# gpg: Signature made Thu 18 Feb 2016 15:46:39 GMT using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg: aka "Michael S. Tsirkin <address@hidden>"
* remotes/mst/tags/for_upstream:
tests/vhost-user-bridge: add scattering of incoming packets
vhost-user interrupt management fixes
rules: filter out irrelevant files
change type of pci_bridge_initfn() to void
dec: convert to realize()
tests: add pxe e1000 and virtio-pci tests
msix: fix msix_vector_masked
virtio: optimize virtio_access_is_big_endian() for little-endian targets
vhost: simplify vhost_needs_vring_endian()
vhost: move virtio 1.0 check to cross-endian helper
virtio: move cross-endian helper to vhost
vhost-net: revert support of cross-endian vnet headers
virtio-net: use the backend cross-endian capabilities
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/dd5e38b19d7c...09125c5e7692
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 1bfa31: virtio-net: use the backend cross-endian capabilit...,
GitHub <=