)]}'
{
  "commit": "6f34807116ffef7c449a656dbe2091d4f4da89c8",
  "tree": "37beefd112c16716fa2e6a30a5870d47b6b0cae4",
  "parents": [
    "f45fd95ec9e8104f6af801c734375029dda0f542"
  ],
  "author": {
    "name": "Hawkins Jiawei",
    "email": "yin31149@gmail.com",
    "time": "Tue Jul 04 11:34:35 2023 +0800"
  },
  "committer": {
    "name": "Michael S. Tsirkin",
    "email": "mst@redhat.com",
    "time": "Mon Jul 10 18:59:32 2023 -0400"
  },
  "message": "vdpa: Return -EIO if device ack is VIRTIO_NET_ERR in _load_offloads()\n\nAccording to VirtIO standard, \"The class, command and\ncommand-specific-data are set by the driver,\nand the device sets the ack byte.\nThere is little it can do except issue a diagnostic\nif ack is not VIRTIO_NET_OK.\"\n\nTherefore, QEMU should stop sending the queued SVQ commands and\ncancel the device startup if the device\u0027s ack is not VIRTIO_NET_OK.\n\nYet the problem is that, vhost_vdpa_net_load_offloads() returns 1 based on\n`*s-\u003estatus !\u003d VIRTIO_NET_OK` when the device\u0027s ack is VIRTIO_NET_ERR.\nAs a result, net-\u003enc-\u003einfo-\u003eload() also returns 1, this makes\nvhost_net_start_one() incorrectly assume the device state is\nsuccessfully loaded by vhost_vdpa_net_load() and return 0, instead of\ngoto `fail` label to cancel the device startup, as vhost_net_start_one()\nonly cancels the device startup when net-\u003enc-\u003einfo-\u003eload() returns a\nnegative value.\n\nThis patch fixes this problem by returning -EIO when the device\u0027s\nack is not VIRTIO_NET_OK.\n\nFixes: 0b58d3686a (\"vdpa: Add vhost_vdpa_net_load_offloads()\")\nSigned-off-by: Hawkins Jiawei \u003cyin31149@gmail.com\u003e\nAcked-by: Jason Wang \u003cjasowang@redhat.com\u003e\nAcked-by: Eugenio Pérez \u003ceperezma@redhat.com\u003e\nMessage-Id: \u003cb0396b80e96322b86f1a0b10c098fc1edd947d72.1688438055.git.yin31149@gmail.com\u003e\nTested-by: Lei Yang \u003cleiyang@redhat.com\u003e\nReviewed-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nSigned-off-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8477ed2579c4b0572e03931ab7ab90ced31e8302",
      "old_mode": 33188,
      "old_path": "net/vhost-vdpa.c",
      "new_id": "679ef4bed0c6716c3d72505ef7e560a83239f643",
      "new_mode": 33188,
      "new_path": "net/vhost-vdpa.c"
    }
  ]
}
