get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/806492/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 806492,
    "url": "http://patchwork.ozlabs.org/api/patches/806492/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1503914913-28893-6-git-send-email-wei.w.wang@intel.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1503914913-28893-6-git-send-email-wei.w.wang@intel.com>",
    "list_archive_url": null,
    "date": "2017-08-28T10:08:33",
    "name": "[v15,5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3b06b45ac306944c7ea01ebfc2838a5bd4b84cea",
    "submitter": {
        "id": 69100,
        "url": "http://patchwork.ozlabs.org/api/people/69100/?format=api",
        "name": "Wang, Wei W",
        "email": "wei.w.wang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1503914913-28893-6-git-send-email-wei.w.wang@intel.com/mbox/",
    "series": [
        {
            "id": 126,
            "url": "http://patchwork.ozlabs.org/api/series/126/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=126",
            "date": "2017-08-28T10:08:28",
            "name": "Virtio-balloon Enhancement",
            "version": 15,
            "mbox": "http://patchwork.ozlabs.org/series/126/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/806492/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/806492/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xgnvJ5kvGz9ryr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 28 Aug 2017 20:24:44 +1000 (AEST)",
            "from localhost ([::1]:37863 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmHDm-0004CB-Mi\n\tfor incoming@patchwork.ozlabs.org; Mon, 28 Aug 2017 06:24:42 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:57883)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <wei.w.wang@intel.com>) id 1dmH9w-00024A-11\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 06:20:45 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <wei.w.wang@intel.com>) id 1dmH9u-00068P-4y\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 06:20:44 -0400",
            "from mga04.intel.com ([192.55.52.120]:17236)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <wei.w.wang@intel.com>)\n\tid 1dmH9t-0005ys-Iz\n\tfor qemu-devel@nongnu.org; Mon, 28 Aug 2017 06:20:42 -0400",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Aug 2017 03:20:41 -0700",
            "from devel-ww.sh.intel.com ([10.239.48.92])\n\tby orsmga003.jf.intel.com with ESMTP; 28 Aug 2017 03:20:37 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.41,441,1498546800\"; d=\"scan'208\";\n\ta=\"1008318994\"",
        "From": "Wei Wang <wei.w.wang@intel.com>",
        "To": "virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org,\n\tqemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,\n\tkvm@vger.kernel.org, linux-mm@kvack.org, mst@redhat.com,\n\tmhocko@kernel.org, akpm@linux-foundation.org, mawilcox@microsoft.com",
        "Date": "Mon, 28 Aug 2017 18:08:33 +0800",
        "Message-Id": "<1503914913-28893-6-git-send-email-wei.w.wang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1503914913-28893-1-git-send-email-wei.w.wang@intel.com>",
        "References": "<1503914913-28893-1-git-send-email-wei.w.wang@intel.com>",
        "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.",
        "X-Received-From": "192.55.52.120",
        "Subject": "[Qemu-devel] [PATCH v15 5/5] virtio-balloon:\n\tVIRTIO_BALLOON_F_CTRL_VQ",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "aarcange@redhat.com, yang.zhang.wz@gmail.com, david@redhat.com,\n\tliliang.opensource@gmail.com, willy@infradead.org,\n\tamit.shah@redhat.com, wei.w.wang@intel.com, quan.xu@aliyun.com,\n\tcornelia.huck@de.ibm.com, pbonzini@redhat.com,\n\tmgorman@techsingularity.net",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Add a new vq, ctrl_vq, to handle commands between the host and guest.\nWith this feature, we will be able to have the control plane and data\nplane separated. In other words, the control related data of each\nfeature will be sent via the ctrl_vq cmds, meanwhile each feature may\nhave its own data plane vq.\n\nFree page report is the the first new feature controlled via ctrl_vq,\nand a new cmd class, VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE, is added.\nCurrently, this feature has two cmds:\nVIRTIO_BALLOON_FREE_PAGE_F_START: This cmd is sent from host to guest\nto start the free page reporting work.\nVIRTIO_BALLOON_FREE_PAGE_F_STOP: This cmd is used bidirectionally. The\nguest would send the cmd to the host to indicate the reporting work is\ndone. The host would send the cmd to the guest to actively request the\nstop of the reporting work.\n\nThe free_page_vq is used to transmit the guest free page blocks to the\nhost.\n\nSigned-off-by: Wei Wang <wei.w.wang@intel.com>\nSigned-off-by: Liang Li <liang.z.li@intel.com>\n---\n drivers/virtio/virtio_balloon.c     | 247 +++++++++++++++++++++++++++++++++---\n include/uapi/linux/virtio_balloon.h |  15 +++\n 2 files changed, 242 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c\nindex 8ecc1d4..1d384a4 100644\n--- a/drivers/virtio/virtio_balloon.c\n+++ b/drivers/virtio/virtio_balloon.c\n@@ -55,7 +55,13 @@ static struct vfsmount *balloon_mnt;\n \n struct virtio_balloon {\n \tstruct virtio_device *vdev;\n-\tstruct virtqueue *inflate_vq, *deflate_vq, *stats_vq;\n+\tstruct virtqueue *inflate_vq, *deflate_vq, *stats_vq, *ctrl_vq,\n+\t\t\t *free_page_vq;\n+\n+\t/* Balloon's own wq for cpu-intensive work items */\n+\tstruct workqueue_struct *balloon_wq;\n+\t/* The work items submitted to the balloon wq are listed here */\n+\tstruct work_struct report_free_page_work;\n \n \t/* The balloon servicing is delegated to a freezable workqueue. */\n \tstruct work_struct update_balloon_stats_work;\n@@ -65,6 +71,9 @@ struct virtio_balloon {\n \tspinlock_t stop_update_lock;\n \tbool stop_update;\n \n+\t/* Stop reporting free pages */\n+\tbool report_free_page_stop;\n+\n \t/* Waiting for host to ack the pages we released. */\n \twait_queue_head_t acked;\n \n@@ -93,6 +102,11 @@ struct virtio_balloon {\n \n \t/* To register callback in oom notifier call chain */\n \tstruct notifier_block nb;\n+\n+\t/* Host to guest ctrlq cmd buf for free page report */\n+\tstruct virtio_balloon_ctrlq_cmd free_page_cmd_in;\n+\t/* Guest to Host ctrlq cmd buf for free page report */\n+\tstruct virtio_balloon_ctrlq_cmd free_page_cmd_out;\n };\n \n static struct virtio_device_id id_table[] = {\n@@ -177,6 +191,26 @@ static void send_balloon_page_sg(struct virtio_balloon *vb,\n \t}\n }\n \n+static void send_free_page_sg(struct virtqueue *vq, void *addr, uint32_t size)\n+{\n+\tunsigned int len;\n+\tint err = -ENOSPC;\n+\n+\tdo {\n+\t\tif (vq->num_free) {\n+\t\t\terr = add_one_sg(vq, addr, size);\n+\t\t\t/* Sanity check: this can't really happen */\n+\t\t\tWARN_ON(err);\n+\t\t\tif (!err)\n+\t\t\t\tvirtqueue_kick(vq);\n+\t\t}\n+\n+\t\t/* Release entries if there are */\n+\t\twhile (virtqueue_get_buf(vq, &len))\n+\t\t\t;\n+\t} while (err == -ENOSPC && vq->num_free);\n+}\n+\n /*\n  * Send balloon pages in sgs to host. The balloon pages are recorded in the\n  * page xbitmap. Each bit in the bitmap corresponds to a page of PAGE_SIZE.\n@@ -525,42 +559,206 @@ static void update_balloon_size_func(struct work_struct *work)\n \t\tqueue_work(system_freezable_wq, work);\n }\n \n-static int init_vqs(struct virtio_balloon *vb)\n+static bool virtio_balloon_send_free_pages(void *opaque, unsigned long pfn,\n+\t\t\t\t\t   unsigned long nr_pages)\n+{\n+\tstruct virtio_balloon *vb = (struct virtio_balloon *)opaque;\n+\tvoid *addr = (void *)pfn_to_kaddr(pfn);\n+\tuint32_t len = nr_pages << PAGE_SHIFT;\n+\n+\tif (vb->report_free_page_stop)\n+\t\treturn 1;\n+\n+\tsend_free_page_sg(vb->free_page_vq, addr, len);\n+\n+\treturn 0;\n+}\n+\n+static void ctrlq_add_cmd(struct virtqueue *vq,\n+\t\t\t  struct virtio_balloon_ctrlq_cmd *cmd,\n+\t\t\t  bool inbuf)\n {\n-\tstruct virtqueue *vqs[3];\n-\tvq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request };\n-\tstatic const char * const names[] = { \"inflate\", \"deflate\", \"stats\" };\n-\tint err, nvqs;\n+\tstruct scatterlist sg;\n+\tint err;\n+\n+\tsg_init_one(&sg, cmd, sizeof(struct virtio_balloon_ctrlq_cmd));\n+\tif (inbuf)\n+\t\terr = virtqueue_add_inbuf(vq, &sg, 1, cmd, GFP_KERNEL);\n+\telse\n+\t\terr = virtqueue_add_outbuf(vq, &sg, 1, cmd, GFP_KERNEL);\n+\n+\t/* Sanity check: this can't really happen */\n+\tWARN_ON(err);\n+}\n \n+static void ctrlq_send_cmd(struct virtio_balloon *vb,\n+\t\t\t  struct virtio_balloon_ctrlq_cmd *cmd,\n+\t\t\t  bool inbuf)\n+{\n+\tstruct virtqueue *vq = vb->ctrl_vq;\n+\n+\tctrlq_add_cmd(vq, cmd, inbuf);\n+\tif (!inbuf) {\n+\t\t/*\n+\t\t * All the input cmd buffers are replenished here.\n+\t\t * This is necessary because the input cmd buffers are lost\n+\t\t * after live migration. The device needs to rewind all of\n+\t\t * them from the ctrl_vq.\n+\t\t */\n+\t\tctrlq_add_cmd(vq, &vb->free_page_cmd_in, true);\n+\t}\n+\tvirtqueue_kick(vq);\n+}\n+\n+static void report_free_page_end(struct virtio_balloon *vb)\n+{\n \t/*\n-\t * We expect two virtqueues: inflate and deflate, and\n-\t * optionally stat.\n+\t * The host may have already requested to stop the reporting before we\n+\t * finish, so no need to notify the host in this case.\n \t */\n-\tnvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2;\n-\terr = virtio_find_vqs(vb->vdev, nvqs, vqs, callbacks, names, NULL);\n+\tif (vb->report_free_page_stop)\n+\t\treturn;\n+\n+\tvb->free_page_cmd_out.class = VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE;\n+\tvb->free_page_cmd_out.cmd = VIRTIO_BALLOON_FREE_PAGE_F_STOP;\n+\tctrlq_send_cmd(vb, &vb->free_page_cmd_out, false);\n+\tvb->report_free_page_stop = true;\n+}\n+\n+static void report_free_page(struct work_struct *work)\n+{\n+\tstruct virtio_balloon *vb;\n+\n+\tvb = container_of(work, struct virtio_balloon, report_free_page_work);\n+\twalk_free_mem_block(vb, 0, &virtio_balloon_send_free_pages);\n+\treport_free_page_end(vb);\n+}\n+\n+static void ctrlq_handle(struct virtqueue *vq)\n+{\n+\tstruct virtio_balloon *vb = vq->vdev->priv;\n+\tstruct virtio_balloon_ctrlq_cmd *cmd;\n+\tunsigned int len;\n+\n+\tcmd = (struct virtio_balloon_ctrlq_cmd *)virtqueue_get_buf(vq, &len);\n+\n+\tif (unlikely(!cmd))\n+\t\treturn;\n+\n+\t/* The outbuf is sent by the host for recycling, so just return. */\n+\tif (cmd == &vb->free_page_cmd_out)\n+\t\treturn;\n+\n+\tswitch (cmd->class) {\n+\tcase VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE:\n+\t\tif (cmd->cmd == VIRTIO_BALLOON_FREE_PAGE_F_STOP) {\n+\t\t\tvb->report_free_page_stop = true;\n+\t\t} else if (cmd->cmd == VIRTIO_BALLOON_FREE_PAGE_F_START) {\n+\t\t\tvb->report_free_page_stop = false;\n+\t\t\tqueue_work(vb->balloon_wq, &vb->report_free_page_work);\n+\t\t}\n+\t\tvb->free_page_cmd_in.class =\n+\t\t\t\t\tVIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE;\n+\t\tctrlq_send_cmd(vb, &vb->free_page_cmd_in, true);\n+\tbreak;\n+\tdefault:\n+\t\tdev_warn(&vb->vdev->dev, \"%s: cmd class not supported\\n\",\n+\t\t\t __func__);\n+\t}\n+}\n+\n+static int init_vqs(struct virtio_balloon *vb)\n+{\n+\tstruct virtqueue **vqs;\n+\tvq_callback_t **callbacks;\n+\tconst char **names;\n+\tstruct scatterlist sg;\n+\tint i, nvqs, err = -ENOMEM;\n+\n+\t/* Inflateq and deflateq are used unconditionally */\n+\tnvqs = 2;\n+\tif (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ))\n+\t\tnvqs++;\n+\t/* If ctrlq is enabled, the free page vq will also be created */\n+\tif (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_CTRL_VQ))\n+\t\tnvqs += 2;\n+\n+\t/* Allocate space for find_vqs parameters */\n+\tvqs = kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);\n+\tif (!vqs)\n+\t\tgoto err_vq;\n+\tcallbacks = kmalloc_array(nvqs, sizeof(*callbacks), GFP_KERNEL);\n+\tif (!callbacks)\n+\t\tgoto err_callback;\n+\tnames = kmalloc_array(nvqs, sizeof(*names), GFP_KERNEL);\n+\tif (!names)\n+\t\tgoto err_names;\n+\n+\tcallbacks[0] = balloon_ack;\n+\tnames[0] = \"inflate\";\n+\tcallbacks[1] = balloon_ack;\n+\tnames[1] = \"deflate\";\n+\n+\ti = 2;\n+\tif (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {\n+\t\tcallbacks[i] = stats_request;\n+\t\tnames[i] = \"stats\";\n+\t\ti++;\n+\t}\n+\n+\tif (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_CTRL_VQ)) {\n+\t\tcallbacks[i] = ctrlq_handle;\n+\t\tnames[i++] = \"ctrlq\";\n+\t\tcallbacks[i] = NULL;\n+\t\tnames[i] = \"free_page_vq\";\n+\t}\n+\n+\terr = vb->vdev->config->find_vqs(vb->vdev, nvqs, vqs, callbacks, names,\n+\t\t\t\t\t NULL, NULL);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto err_find;\n \n \tvb->inflate_vq = vqs[0];\n \tvb->deflate_vq = vqs[1];\n+\ti = 2;\n \tif (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {\n-\t\tstruct scatterlist sg;\n-\t\tunsigned int num_stats;\n-\t\tvb->stats_vq = vqs[2];\n-\n+\t\tvb->stats_vq = vqs[i++];\n \t\t/*\n \t\t * Prime this virtqueue with one buffer so the hypervisor can\n \t\t * use it to signal us later (it can't be broken yet!).\n \t\t */\n-\t\tnum_stats = update_balloon_stats(vb);\n-\n-\t\tsg_init_one(&sg, vb->stats, sizeof(vb->stats[0]) * num_stats);\n+\t\tsg_init_one(&sg, vb->stats, sizeof(vb->stats));\n \t\tif (virtqueue_add_outbuf(vb->stats_vq, &sg, 1, vb, GFP_KERNEL)\n-\t\t    < 0)\n-\t\t\tBUG();\n+\t\t    < 0) {\n+\t\t\tdev_warn(&vb->vdev->dev, \"%s: add stat_vq failed\\n\",\n+\t\t\t\t __func__);\n+\t\t\tgoto err_find;\n+\t\t}\n \t\tvirtqueue_kick(vb->stats_vq);\n \t}\n+\n+\tif (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_CTRL_VQ)) {\n+\t\tvb->ctrl_vq = vqs[i++];\n+\t\tvb->free_page_vq = vqs[i];\n+\t\t/* Prime the ctrlq with an inbuf for the host to send a cmd */\n+\t\tvb->free_page_cmd_in.class =\n+\t\t\t\t\tVIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE;\n+\t\tctrlq_send_cmd(vb, &vb->free_page_cmd_in, true);\n+\t}\n+\n+\tkfree(names);\n+\tkfree(callbacks);\n+\tkfree(vqs);\n \treturn 0;\n+\n+err_find:\n+\tkfree(names);\n+err_names:\n+\tkfree(callbacks);\n+err_callback:\n+\tkfree(vqs);\n+err_vq:\n+\treturn err;\n }\n \n #ifdef CONFIG_BALLOON_COMPACTION\n@@ -689,6 +887,13 @@ static int virtballoon_probe(struct virtio_device *vdev)\n \tif (virtio_has_feature(vdev, VIRTIO_BALLOON_F_SG))\n \t\txb_init(&vb->page_xb);\n \n+\tif (virtio_has_feature(vdev, VIRTIO_BALLOON_F_CTRL_VQ)) {\n+\t\tvb->balloon_wq = alloc_workqueue(\"balloon-wq\",\n+\t\t\t\t\tWQ_FREEZABLE | WQ_CPU_INTENSIVE, 0);\n+\t\tINIT_WORK(&vb->report_free_page_work, report_free_page);\n+\t\tvb->report_free_page_stop = true;\n+\t}\n+\n \tvb->nb.notifier_call = virtballoon_oom_notify;\n \tvb->nb.priority = VIRTBALLOON_OOM_NOTIFY_PRIORITY;\n \terr = register_oom_notifier(&vb->nb);\n@@ -753,6 +958,7 @@ static void virtballoon_remove(struct virtio_device *vdev)\n \tspin_unlock_irq(&vb->stop_update_lock);\n \tcancel_work_sync(&vb->update_balloon_size_work);\n \tcancel_work_sync(&vb->update_balloon_stats_work);\n+\tcancel_work_sync(&vb->report_free_page_work);\n \n \tremove_common(vb);\n #ifdef CONFIG_BALLOON_COMPACTION\n@@ -806,6 +1012,7 @@ static unsigned int features[] = {\n \tVIRTIO_BALLOON_F_STATS_VQ,\n \tVIRTIO_BALLOON_F_DEFLATE_ON_OOM,\n \tVIRTIO_BALLOON_F_SG,\n+\tVIRTIO_BALLOON_F_CTRL_VQ,\n };\n \n static struct virtio_driver virtio_balloon_driver = {\ndiff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h\nindex 37780a7..dbf0616 100644\n--- a/include/uapi/linux/virtio_balloon.h\n+++ b/include/uapi/linux/virtio_balloon.h\n@@ -35,6 +35,7 @@\n #define VIRTIO_BALLOON_F_STATS_VQ\t1 /* Memory Stats virtqueue */\n #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM\t2 /* Deflate balloon on OOM */\n #define VIRTIO_BALLOON_F_SG\t\t3 /* Use sg instead of PFN lists */\n+#define VIRTIO_BALLOON_F_CTRL_VQ\t4 /* Control Virtqueue */\n \n /* Size of a PFN in the balloon interface. */\n #define VIRTIO_BALLOON_PFN_SHIFT 12\n@@ -83,4 +84,18 @@ struct virtio_balloon_stat {\n \t__virtio64 val;\n } __attribute__((packed));\n \n+enum {\n+\tVIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE = 0,\n+\tVIRTIO_BALLOON_CTRLQ_CLASS_MAX,\n+};\n+\n+struct virtio_balloon_ctrlq_cmd {\n+\t__virtio32 class;\n+\t__virtio32 cmd;\n+};\n+\n+/* Ctrlq commands related to VIRTIO_BALLOON_CTRLQ_CLASS_FREE_PAGE */\n+#define VIRTIO_BALLOON_FREE_PAGE_F_STOP\t\t0\n+#define VIRTIO_BALLOON_FREE_PAGE_F_START\t1\n+\n #endif /* _LINUX_VIRTIO_BALLOON_H */\n",
    "prefixes": [
        "v15",
        "5/5"
    ]
}