Moved virtio backend specific code out of common feature negotiation path. virtio-pci features are stored in PCI register. Before feature negotiation they can be considered device (host) features. They have to be negotiated with local features and written back into the very same register. For virtio-user, the situation is a bit different - vhost-user protocol contains two feature-related commands GET_FEATURES and SET_FEATURES. While SET_ sends already negotiated features, GET_ always returns device (host) features. Previously, we used to store native device (host) features in local variables to (ineptly) make the negotiation path the same for virtio-pci and virtio-user. Instead of fixing this functionality, it has been removed. Now, the vtpci->get_features might be either negotiated or not. This is now stated in this function's doc. This solution doesn't have any drawbacks and simplifies the code. Change-Id: I270e9cad8baaeae61b58992ee06e9069eac10aaf Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/381472 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> |
||
---|---|---|
.. | ||
vhost_user.c | ||
vhost.h | ||
virtio_user_dev.c | ||
virtio_user_dev.h |