From nobody Sun May 19 18:10:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588973642; cv=none; d=zohomail.com; s=zohoarc; b=mXGaQ/N6j5739MR+b7A1qQRqIxo4cWikkaSet7UjEe7s8Ks6g0LHOyTkfxZz/Jd82W/TndKfDxJxiLC+V2367ORpU/JU/hqeE0nVlkXhDAyANw6jtne5tY4CePRDnB6HKVruMZ7extJPgoIH737+iklcYxVunJOi6yWaYz4hexY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588973642; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9FgnM4HvErXKWZJbbQvfcjSzozlq0cqUHZYYv5AzslI=; b=bYHmijEjebhTnkKgPuFksQxXVelYxuGxdoHAlbz4NMFvLMiJpWhtBAocR5Cmm8cuXrOD05RNHiTIpDmG7wDFe0Oqn8X+jWaErXlLi6Kn2vEWuPIqmeyqdmXBniYCZLYnqNphQUjUMO0ce3Zd6VPPuLUg2vvE/PKgU++pDOzNGR4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158897364223378.80919932212396; Fri, 8 May 2020 14:34:02 -0700 (PDT) Received: from localhost ([::1]:57426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXAd6-0007nW-VN for importer@patchew.org; Fri, 08 May 2020 17:34:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXAZF-000410-2t for qemu-devel@nongnu.org; Fri, 08 May 2020 17:30:01 -0400 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]:37840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXAZD-0008KD-RR for qemu-devel@nongnu.org; Fri, 08 May 2020 17:30:00 -0400 Received: by mail-qt1-x842.google.com with SMTP id 4so2699189qtb.4 for ; Fri, 08 May 2020 14:29:59 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id x34sm2638903qta.43.2020.05.08.14.29.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 May 2020 14:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=9FgnM4HvErXKWZJbbQvfcjSzozlq0cqUHZYYv5AzslI=; b=dE9/mmwNCYqGmNdmAMBLvA11eqRXGtZaSQqXXKFKlDsGslJfQjnbKOVxUdCBQU6I6/ Q/q9Efl3TrAfsdoc/mjGLVShCwUL54m1/cQpEqXp/xzfZbBJVHhLsHLjQ3jIPhc/PWfi 53igVLyL4rPCMgd2+KwA8LQSSqbWp15/qKzKtPxmnXrMhBICJM1VlA2wqHct/o3DI4qd E1i1ux/PtOotYskDeYN3cN2DYWWMTwMs5/2tEEgHj87PmkWfLCrLuVETP0PPrn9nBPwK 35k0C3gCHdPvq0UxIjjKHPPSJzuLAaXjAI7geXxKEyWOFbj0BXE8RBvmz3f5LsYpMdsu Pchw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=9FgnM4HvErXKWZJbbQvfcjSzozlq0cqUHZYYv5AzslI=; b=uR9lh1q6R42om3Oh/zG1zce30LdHsXj4zr5Ph8wnencEkVH/VhfBOwZrW3fIl/DRok 5yHEF3LL9qZAOoegutCt9zBVo7aT2nlkVM98ZUwWhkn3kgzrLq/SNxfkNOlXK3q6ama4 NZChe5ZtnugpTjWCn4eeHbD0NUbPAWPgfkJM58/OClTmaN5kId4JUjbZX7JNhGfi2ieb goURvtBKiTZQnMW5YlnaXLeTLFqJ7nDNO87z7iC9pDH+9qqajqZI+R16lh34mEnOQaZ6 IuXxywVWqy5bWE74pZ8AAfgoOdTwqmuyAoGB1eocp6DBmA15eS+WrvJisvtZpW27AIF3 ZLAQ== X-Gm-Message-State: AGi0Pub/buMnnbZAvL2FeiylEA1UVwKPpVZ9pN7dbqawOw8TCviXFy6w jvZxsSVOF29xaBXzt1rs68Y= X-Google-Smtp-Source: APiQypKhYspCYXH6/jwB5rjEnguUH9nlu704/Wb1Wj87JnPcObyB9qOFLn55mci18Hkc958eZfkpRQ== X-Received: by 2002:aed:2b43:: with SMTP id p61mr5127368qtd.298.1588973398716; Fri, 08 May 2020 14:29:58 -0700 (PDT) Subject: [PATCH v24 QEMU 1/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint' From: Alexander Duyck To: david@redhat.com, mst@redhat.com Date: Fri, 08 May 2020 14:29:57 -0700 Message-ID: <20200508212957.26071.86438.stgit@localhost.localdomain> In-Reply-To: <20200508212719.26071.94248.stgit@localhost.localdomain> References: <20200508212719.26071.94248.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::842; envelope-from=alexander.duyck@gmail.com; helo=mail-qt1-x842.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) From: Alexander Duyck In an upcoming patch a feature named Free Page Reporting is about to be added. In order to avoid any confusion we should drop the use of the word 'report' when referring to Free Page Hinting. So what this patch does is go through and replace all instances of 'report' with 'hint" when we are referring to free page hinting. Acked-by: David Hildenbrand Signed-off-by: Alexander Duyck --- hw/virtio/virtio-balloon.c | 78 ++++++++++++++++++--------------= ---- include/hw/virtio/virtio-balloon.h | 20 +++++---- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a4729f7fc930..a209706b4d8d 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -466,21 +466,21 @@ static bool get_free_page_hints(VirtIOBalloon *dev) ret =3D false; goto out; } - if (id =3D=3D dev->free_page_report_cmd_id) { - dev->free_page_report_status =3D FREE_PAGE_REPORT_S_START; + if (id =3D=3D dev->free_page_hint_cmd_id) { + dev->free_page_hint_status =3D FREE_PAGE_HINT_S_START; } else { /* * Stop the optimization only when it has started. This * avoids a stale stop sign for the previous command. */ - if (dev->free_page_report_status =3D=3D FREE_PAGE_REPORT_S_STA= RT) { - dev->free_page_report_status =3D FREE_PAGE_REPORT_S_STOP; + if (dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_START) { + dev->free_page_hint_status =3D FREE_PAGE_HINT_S_STOP; } } } =20 if (elem->in_num) { - if (dev->free_page_report_status =3D=3D FREE_PAGE_REPORT_S_START) { + if (dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_START) { qemu_guest_free_page_hint(elem->in_sg[0].iov_base, elem->in_sg[0].iov_len); } @@ -506,11 +506,11 @@ static void virtio_ballloon_get_free_page_hints(void = *opaque) qemu_mutex_unlock(&dev->free_page_lock); virtio_notify(vdev, vq); /* - * Start to poll the vq once the reporting started. Otherwise, conti= nue + * Start to poll the vq once the hinting started. Otherwise, continue * only when there are entries on the vq, which need to be given bac= k. */ } while (continue_to_get_hints || - dev->free_page_report_status =3D=3D FREE_PAGE_REPORT_S_START); + dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_START); virtio_queue_set_notification(vq, 1); } =20 @@ -531,14 +531,14 @@ static void virtio_balloon_free_page_start(VirtIOBall= oon *s) return; } =20 - if (s->free_page_report_cmd_id =3D=3D UINT_MAX) { - s->free_page_report_cmd_id =3D - VIRTIO_BALLOON_FREE_PAGE_REPORT_CMD_ID_MIN; + if (s->free_page_hint_cmd_id =3D=3D UINT_MAX) { + s->free_page_hint_cmd_id =3D + VIRTIO_BALLOON_FREE_PAGE_HINT_CMD_ID_MIN; } else { - s->free_page_report_cmd_id++; + s->free_page_hint_cmd_id++; } =20 - s->free_page_report_status =3D FREE_PAGE_REPORT_S_REQUESTED; + s->free_page_hint_status =3D FREE_PAGE_HINT_S_REQUESTED; virtio_notify_config(vdev); } =20 @@ -546,18 +546,18 @@ static void virtio_balloon_free_page_stop(VirtIOBallo= on *s) { VirtIODevice *vdev =3D VIRTIO_DEVICE(s); =20 - if (s->free_page_report_status !=3D FREE_PAGE_REPORT_S_STOP) { + if (s->free_page_hint_status !=3D FREE_PAGE_HINT_S_STOP) { /* * The lock also guarantees us that the * virtio_ballloon_get_free_page_hints exits after the - * free_page_report_status is set to S_STOP. + * free_page_hint_status is set to S_STOP. */ qemu_mutex_lock(&s->free_page_lock); /* - * The guest hasn't done the reporting, so host sends a notificati= on - * to the guest to actively stop the reporting. + * The guest isn't done hinting, so send a notification + * to the guest to actively stop the hinting. */ - s->free_page_report_status =3D FREE_PAGE_REPORT_S_STOP; + s->free_page_hint_status =3D FREE_PAGE_HINT_S_STOP; qemu_mutex_unlock(&s->free_page_lock); virtio_notify_config(vdev); } @@ -567,15 +567,15 @@ static void virtio_balloon_free_page_done(VirtIOBallo= on *s) { VirtIODevice *vdev =3D VIRTIO_DEVICE(s); =20 - s->free_page_report_status =3D FREE_PAGE_REPORT_S_DONE; + s->free_page_hint_status =3D FREE_PAGE_HINT_S_DONE; virtio_notify_config(vdev); } =20 static int -virtio_balloon_free_page_report_notify(NotifierWithReturn *n, void *data) +virtio_balloon_free_page_hint_notify(NotifierWithReturn *n, void *data) { VirtIOBalloon *dev =3D container_of(n, VirtIOBalloon, - free_page_report_notify); + free_page_hint_notify); VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); PrecopyNotifyData *pnd =3D data; =20 @@ -624,7 +624,7 @@ static size_t virtio_balloon_config_size(VirtIOBalloon = *s) if (virtio_has_feature(features, VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { return offsetof(struct virtio_balloon_config, poison_val); } - return offsetof(struct virtio_balloon_config, free_page_report_cmd_id); + return offsetof(struct virtio_balloon_config, free_page_hint_cmd_id); } =20 static void virtio_balloon_get_config(VirtIODevice *vdev, uint8_t *config_= data) @@ -635,14 +635,14 @@ static void virtio_balloon_get_config(VirtIODevice *v= dev, uint8_t *config_data) config.num_pages =3D cpu_to_le32(dev->num_pages); config.actual =3D cpu_to_le32(dev->actual); =20 - if (dev->free_page_report_status =3D=3D FREE_PAGE_REPORT_S_REQUESTED) { - config.free_page_report_cmd_id =3D - cpu_to_le32(dev->free_page_report_cmd_id); - } else if (dev->free_page_report_status =3D=3D FREE_PAGE_REPORT_S_STOP= ) { - config.free_page_report_cmd_id =3D + if (dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_REQUESTED) { + config.free_page_hint_cmd_id =3D + cpu_to_le32(dev->free_page_hint_cmd_id); + } else if (dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_STOP) { + config.free_page_hint_cmd_id =3D cpu_to_le32(VIRTIO_BALLOON_CMD_ID_STOP); - } else if (dev->free_page_report_status =3D=3D FREE_PAGE_REPORT_S_DONE= ) { - config.free_page_report_cmd_id =3D + } else if (dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_DONE) { + config.free_page_hint_cmd_id =3D cpu_to_le32(VIRTIO_BALLOON_CMD_ID_DONE); } =20 @@ -743,14 +743,14 @@ static int virtio_balloon_post_load_device(void *opaq= ue, int version_id) return 0; } =20 -static const VMStateDescription vmstate_virtio_balloon_free_page_report = =3D { +static const VMStateDescription vmstate_virtio_balloon_free_page_hint =3D { .name =3D "virtio-balloon-device/free-page-report", .version_id =3D 1, .minimum_version_id =3D 1, .needed =3D virtio_balloon_free_page_support, .fields =3D (VMStateField[]) { - VMSTATE_UINT32(free_page_report_cmd_id, VirtIOBalloon), - VMSTATE_UINT32(free_page_report_status, VirtIOBalloon), + VMSTATE_UINT32(free_page_hint_cmd_id, VirtIOBalloon), + VMSTATE_UINT32(free_page_hint_status, VirtIOBalloon), VMSTATE_END_OF_LIST() } }; @@ -766,7 +766,7 @@ static const VMStateDescription vmstate_virtio_balloon_= device =3D { VMSTATE_END_OF_LIST() }, .subsections =3D (const VMStateDescription * []) { - &vmstate_virtio_balloon_free_page_report, + &vmstate_virtio_balloon_free_page_hint, NULL } }; @@ -797,12 +797,12 @@ static void virtio_balloon_device_realize(DeviceState= *dev, Error **errp) VIRTIO_BALLOON_F_FREE_PAGE_HINT)) { s->free_page_vq =3D virtio_add_queue(vdev, VIRTQUEUE_MAX_SIZE, virtio_balloon_handle_free_page= _vq); - s->free_page_report_status =3D FREE_PAGE_REPORT_S_STOP; - s->free_page_report_cmd_id =3D - VIRTIO_BALLOON_FREE_PAGE_REPORT_CMD_ID_MIN; - s->free_page_report_notify.notify =3D - virtio_balloon_free_page_report_not= ify; - precopy_add_notifier(&s->free_page_report_notify); + s->free_page_hint_status =3D FREE_PAGE_HINT_S_STOP; + s->free_page_hint_cmd_id =3D + VIRTIO_BALLOON_FREE_PAGE_HINT_CMD_ID_MIN; + s->free_page_hint_notify.notify =3D + virtio_balloon_free_page_hint_notif= y; + precopy_add_notifier(&s->free_page_hint_notify); if (s->iothread) { object_ref(OBJECT(s->iothread)); s->free_page_bh =3D aio_bh_new(iothread_get_aio_context(s->iot= hread), @@ -827,7 +827,7 @@ static void virtio_balloon_device_unrealize(DeviceState= *dev, Error **errp) if (virtio_balloon_free_page_support(s)) { qemu_bh_delete(s->free_page_bh); virtio_balloon_free_page_stop(s); - precopy_remove_notifier(&s->free_page_report_notify); + precopy_remove_notifier(&s->free_page_hint_notify); } balloon_stats_destroy_timer(s); qemu_remove_balloon_handler(s); diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-= balloon.h index d1c968d2376e..108cff97e71a 100644 --- a/include/hw/virtio/virtio-balloon.h +++ b/include/hw/virtio/virtio-balloon.h @@ -23,7 +23,7 @@ #define VIRTIO_BALLOON(obj) \ OBJECT_CHECK(VirtIOBalloon, (obj), TYPE_VIRTIO_BALLOON) =20 -#define VIRTIO_BALLOON_FREE_PAGE_REPORT_CMD_ID_MIN 0x80000000 +#define VIRTIO_BALLOON_FREE_PAGE_HINT_CMD_ID_MIN 0x80000000 =20 typedef struct virtio_balloon_stat VirtIOBalloonStat; =20 @@ -33,20 +33,20 @@ typedef struct virtio_balloon_stat_modern { uint64_t val; } VirtIOBalloonStatModern; =20 -enum virtio_balloon_free_page_report_status { - FREE_PAGE_REPORT_S_STOP =3D 0, - FREE_PAGE_REPORT_S_REQUESTED =3D 1, - FREE_PAGE_REPORT_S_START =3D 2, - FREE_PAGE_REPORT_S_DONE =3D 3, +enum virtio_balloon_free_page_hint_status { + FREE_PAGE_HINT_S_STOP =3D 0, + FREE_PAGE_HINT_S_REQUESTED =3D 1, + FREE_PAGE_HINT_S_START =3D 2, + FREE_PAGE_HINT_S_DONE =3D 3, }; =20 typedef struct VirtIOBalloon { VirtIODevice parent_obj; VirtQueue *ivq, *dvq, *svq, *free_page_vq; - uint32_t free_page_report_status; + uint32_t free_page_hint_status; uint32_t num_pages; uint32_t actual; - uint32_t free_page_report_cmd_id; + uint32_t free_page_hint_cmd_id; uint64_t stats[VIRTIO_BALLOON_S_NR]; VirtQueueElement *stats_vq_elem; size_t stats_vq_offset; @@ -55,7 +55,7 @@ typedef struct VirtIOBalloon { QEMUBH *free_page_bh; /* * Lock to synchronize threads to access the free page reporting relat= ed - * fields (e.g. free_page_report_status). + * fields (e.g. free_page_hint_status). */ QemuMutex free_page_lock; QemuCond free_page_cond; @@ -64,7 +64,7 @@ typedef struct VirtIOBalloon { * stopped. */ bool block_iothread; - NotifierWithReturn free_page_report_notify; + NotifierWithReturn free_page_hint_notify; int64_t stats_last_update; int64_t stats_poll_interval; uint32_t host_features; From nobody Sun May 19 18:10:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588973545; cv=none; d=zohomail.com; s=zohoarc; b=XItE00Mbtr9rxUEdqlwozLCWtHm6GoSwJwEnQsnaS7moWQS2jkVIgQ/u9GjHv9AJ4UhfbG/kzJeKC8u7o9gVRRWvdwDyCo+I1SDBdpVOUz7tsCxcK+L3mfuvL/cvrxmhlKTZKH1zdEkv2URDOPNgNzGTtzIkYCW+XEyl9WxTNuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588973545; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kWpDL9Wq56xlA/lKBb//jEOpRoZyN/hs0hSMMWDLET0=; b=ggtycCyeAdgt/3IltfzkHaXpm9XZmT+RKLIRn3lDl1qRtoiUXEkHtZ6wxl6wdTxraqKJyVEXFqQNcebyUJFAaJX146p+EhS2EyyKb6pJzV7P6KZYl6HY7oxV45U/CZdSB44O6/5NohhvWYUSQ/x1DCyvZgSuZw8rnfRkBCyxtDU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588973545168123.16911054709794; Fri, 8 May 2020 14:32:25 -0700 (PDT) Received: from localhost ([::1]:52548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXAbX-0005Rx-Rm for importer@patchew.org; Fri, 08 May 2020 17:32:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXAZL-000474-QN for qemu-devel@nongnu.org; Fri, 08 May 2020 17:30:07 -0400 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]:45427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXAZK-0008Nj-PH for qemu-devel@nongnu.org; Fri, 08 May 2020 17:30:07 -0400 Received: by mail-qk1-x742.google.com with SMTP id c64so3294707qkf.12 for ; Fri, 08 May 2020 14:30:06 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id c41sm2584988qta.96.2020.05.08.14.30.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 May 2020 14:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=kWpDL9Wq56xlA/lKBb//jEOpRoZyN/hs0hSMMWDLET0=; b=JI9BSC4N3pDB38mLBcFvDd2tp0goG4FiO0ZA+kcDHB6g5vbFMYHJhOy5/6gVsN/kOs eClEIMhMJJB0/N796xp+H4xTVetH+7GyRIul+t0R/9FJI5YV+MnrzKMlUjDnqcXia6s/ 58d6VHyk2uBP2bYkJJDCXfIoxdohlYfaUzqQUjD7dsbSKkS17rBIGKRyxtrZRPu1NXT/ zToHDrrCiw9xoCQU4LiO8HrsBJb2vh3R2TN8MZHMErMtjcApRBfWYx7WhfLw89aB0DfT plSNGbT6YibTUYj/jdH2yKvj8+2IXZyEjcnDhDvgY20FUlxCmq0r9GuoHmjSUXFIGd3R mDcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=kWpDL9Wq56xlA/lKBb//jEOpRoZyN/hs0hSMMWDLET0=; b=Hi7Ixgl3XCNTiOwWiATA3RroNvnYgaJxRbO8o0VJDUGcaBiUS6DuVu5hDkw5L0oNMB KzBEbS4f0p756HSKimFKIgT03vE1wyPohwhyqP3M+FjsUHSvbRmYX5/LRn9dhkou9Q+X /cQuZ/S/lxJGt1a95hCLuwoo7SPKhZYokmV04ryh7Pyu/EGAdJ3iX9SdUcNT3ACQyXDO jC+X83fnyipudH/XjroNa86rkgyQIswlqHAN89SXySZv2UNjxS25QTc9uO7FdikBKYMO pzZACQOu5BWckcmu7LBei5YZnzBU5+mj417b6IGCAqq0SEMcgLjBpDy96X6jddZMZbKJ 2s7A== X-Gm-Message-State: AGi0PubtAzn+TAqtkjx9mOLvg0JYUwXX80comFJObD3Hnvee1gP4Pe8E aA4SNohmLf9Nb3bP12NEPC4= X-Google-Smtp-Source: APiQypLmFG4qdqFo/QfLNb9iWky/BaflRucfiIMtieeh+2N6fQrUHXYeIKIMRIiUF5HzAUr64FXNEA== X-Received: by 2002:a05:620a:b19:: with SMTP id t25mr4586856qkg.428.1588973405564; Fri, 08 May 2020 14:30:05 -0700 (PDT) Subject: [PATCH v24 QEMU 2/3] virtio-balloon: Implement support for page poison reporting feature From: Alexander Duyck To: david@redhat.com, mst@redhat.com Date: Fri, 08 May 2020 14:30:03 -0700 Message-ID: <20200508213003.26071.95962.stgit@localhost.localdomain> In-Reply-To: <20200508212719.26071.94248.stgit@localhost.localdomain> References: <20200508212719.26071.94248.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::742; envelope-from=alexander.duyck@gmail.com; helo=mail-qk1-x742.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) From: Alexander Duyck We need to make certain to advertise support for page poison reporting if we want to actually get data on if the guest will be poisoning pages. Add a value for reporting the poison value being used if page poisoning is enabled in the guest. With this we can determine if we will need to skip free page reporting when it is enabled in the future. The value currently has no impact on existing balloon interfaces. In the case of existing balloon interfaces the onus is on the guest driver to reapply whatever poison is in place. When we add free page reporting the poison value is used to determine if we can perform in-place page reporting. The expectation is that a reported page will already contain the value specified by the poison, and the reporting of the page should not change that value. Acked-by: David Hildenbrand Signed-off-by: Alexander Duyck --- hw/core/machine.c | 4 +++- hw/virtio/virtio-balloon.c | 29 +++++++++++++++++++++++++++++ include/hw/virtio/virtio-balloon.h | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 7a50dd518f4c..da26d58634dc 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -28,7 +28,9 @@ #include "hw/mem/nvdimm.h" #include "migration/vmstate.h" =20 -GlobalProperty hw_compat_5_0[] =3D {}; +GlobalProperty hw_compat_5_0[] =3D { + { "virtio-balloon-device", "page-poison", "false" }, +}; const size_t hw_compat_5_0_len =3D G_N_ELEMENTS(hw_compat_5_0); =20 GlobalProperty hw_compat_4_2[] =3D { diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a209706b4d8d..1666132a24c1 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -634,6 +634,7 @@ static void virtio_balloon_get_config(VirtIODevice *vde= v, uint8_t *config_data) =20 config.num_pages =3D cpu_to_le32(dev->num_pages); config.actual =3D cpu_to_le32(dev->actual); + config.poison_val =3D cpu_to_le32(dev->poison_val); =20 if (dev->free_page_hint_status =3D=3D FREE_PAGE_HINT_S_REQUESTED) { config.free_page_hint_cmd_id =3D @@ -683,6 +684,14 @@ static ram_addr_t get_current_ram_size(void) return size; } =20 +static bool virtio_balloon_page_poison_support(void *opaque) +{ + VirtIOBalloon *s =3D opaque; + VirtIODevice *vdev =3D VIRTIO_DEVICE(s); + + return virtio_vdev_has_feature(vdev, VIRTIO_BALLOON_F_PAGE_POISON); +} + static void virtio_balloon_set_config(VirtIODevice *vdev, const uint8_t *config_data) { @@ -697,6 +706,10 @@ static void virtio_balloon_set_config(VirtIODevice *vd= ev, qapi_event_send_balloon_change(vm_ram_size - ((ram_addr_t) dev->actual << VIRTIO_BALLOON_PFN_SH= IFT)); } + dev->poison_val =3D 0; + if (virtio_balloon_page_poison_support(dev)) { + dev->poison_val =3D le32_to_cpu(config.poison_val); + } trace_virtio_balloon_set_config(dev->actual, oldactual); } =20 @@ -755,6 +768,17 @@ static const VMStateDescription vmstate_virtio_balloon= _free_page_hint =3D { } }; =20 +static const VMStateDescription vmstate_virtio_balloon_page_poison =3D { + .name =3D "vitio-balloon-device/page-poison", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D virtio_balloon_page_poison_support, + .fields =3D (VMStateField[]) { + VMSTATE_UINT32(poison_val, VirtIOBalloon), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_virtio_balloon_device =3D { .name =3D "virtio-balloon-device", .version_id =3D 1, @@ -767,6 +791,7 @@ static const VMStateDescription vmstate_virtio_balloon_= device =3D { }, .subsections =3D (const VMStateDescription * []) { &vmstate_virtio_balloon_free_page_hint, + &vmstate_virtio_balloon_page_poison, NULL } }; @@ -854,6 +879,8 @@ static void virtio_balloon_device_reset(VirtIODevice *v= dev) g_free(s->stats_vq_elem); s->stats_vq_elem =3D NULL; } + + s->poison_val =3D 0; } =20 static void virtio_balloon_set_status(VirtIODevice *vdev, uint8_t status) @@ -916,6 +943,8 @@ static Property virtio_balloon_properties[] =3D { VIRTIO_BALLOON_F_DEFLATE_ON_OOM, false), DEFINE_PROP_BIT("free-page-hint", VirtIOBalloon, host_features, VIRTIO_BALLOON_F_FREE_PAGE_HINT, false), + DEFINE_PROP_BIT("page-poison", VirtIOBalloon, host_features, + VIRTIO_BALLOON_F_PAGE_POISON, true), /* QEMU 4.0 accidentally changed the config size even when free-page-h= int * is disabled, resulting in QEMU 3.1 migration incompatibility. This * property retains this quirk for QEMU 4.1 machine types. diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-= balloon.h index 108cff97e71a..3ca2a78e1aca 100644 --- a/include/hw/virtio/virtio-balloon.h +++ b/include/hw/virtio/virtio-balloon.h @@ -70,6 +70,7 @@ typedef struct VirtIOBalloon { uint32_t host_features; =20 bool qemu_4_0_config_size; + uint32_t poison_val; } VirtIOBalloon; =20 #endif From nobody Sun May 19 18:10:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588973559; cv=none; d=zohomail.com; s=zohoarc; b=nzMrnzi6xlaZjlqJYfn6BxldYmb8yJSdKEyKImDmXsJr62un2rLg0UhQfioOzfuGYxaTo/omJ+sWQxI4EFeX3imTPTGkBvg++uXi4B0bGgUadd+iMbbk4IFpaXOpeyOZhpCQaB4nJXYHCLMiUWXtQSgiRU2L8qauPh+Mfh9yApA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588973559; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=f60PjaQ32uAPz31QIwCr3FQCyG63xWUpLWuGVvAuWxg=; b=OOFnz8uAYQ615UD5xe08WXzLHAs8ESrksMLNBaPBdGjKLfpwFht01ut5hqcQGVIdDkF+6RbqL9jWG35E8Dbxi1lpFihUADXrfOurBLqBbUeBEamJ6Wat9V3VucB+QDT7UQiPW3A7ENVNAlmg8zEYmvbKYtZwq5dVOM85LC60Ia0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588973559599557.4286583094264; Fri, 8 May 2020 14:32:39 -0700 (PDT) Received: from localhost ([::1]:52998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXAbm-0005iM-2J for importer@patchew.org; Fri, 08 May 2020 17:32:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXAZT-0004HA-FW for qemu-devel@nongnu.org; Fri, 08 May 2020 17:30:15 -0400 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]:44150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXAZR-0008PZ-PO for qemu-devel@nongnu.org; Fri, 08 May 2020 17:30:14 -0400 Received: by mail-qv1-xf2b.google.com with SMTP id ck5so1541614qvb.11 for ; Fri, 08 May 2020 14:30:13 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id n13sm2578429qtf.15.2020.05.08.14.30.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 May 2020 14:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=f60PjaQ32uAPz31QIwCr3FQCyG63xWUpLWuGVvAuWxg=; b=hZt/tbIUr7MZ/AcQsUw249u1oIHACXw9aWTb/tX2NjNB7FxambPwkWDPg3Lb/r9FyY IVQQaDp02v7414nQR1P4nq8FXUjlzF75vljYV5DxF3IMsqzQqqn/PckPUf1eXISFw7aU YUbVWyshPVc3cjbSU6bGiINaeo+qiAxNoRu8EgvkKZPy760X1CUzjXKXJoyF1uQEsBV5 kgVp/xXJvTBitulV7NcjH0DInamLDw6FI/SyJK1iCgH7stjBiMEZ58g1pSnjOyo6DnRd 12PowWmYpexTePz5uI7bdLWNcHTxw1ebj0GcvSqVqNBw94osVTwMcHOwOoZfsSkjUI60 4Agw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=f60PjaQ32uAPz31QIwCr3FQCyG63xWUpLWuGVvAuWxg=; b=t7q0/spNDX7k9T79+6uzxi6UGdfGKa3GBalGuRd+Oh/g3lUtGu1GnG0HhSxDSZC1f4 c6BYuMb2R4su3fg575oxfCDFFTbj3jj4R2k/wkxkvCUlgnm/jqZAIfTcTVBFDKAEL55v jLOJyWoCkwUkMfqHk2ebgmH9Fx6PDOTVzYaNf0kQDi9EurFUrMgiOnhcBZkXsUdNBsVj q3bogFDL/nPRy5NppfnkqxOJepbON0dTDmtzGXc1jdCg/0QTLW4GtEk+SkVzwNNVCPc3 wVyybZKUPXsw1KogjSqwk3mKVHYh6/ok1MhwaLCjxdLQAPb3suTrxazbE6GBxF6Fx7DC aBsg== X-Gm-Message-State: AGi0PuasV5r3De+JzLrsb5QXi6LhBojBJwX+FhF5yZ7Pw7dlRDqCtGf3 UpAB6zKYKDVNvxro9lXwmLI= X-Google-Smtp-Source: APiQypIL2mb0AsOw74PTQWltYRmp6EqRUULHHouBHJlKkcSXJ8xqpuUN0vTwvqnvAwHvRm5g5dfC8w== X-Received: by 2002:a0c:b44c:: with SMTP id e12mr4722649qvf.30.1588973412489; Fri, 08 May 2020 14:30:12 -0700 (PDT) Subject: [PATCH v24 QEMU 3/3] virtio-balloon: Provide an interface for free page reporting From: Alexander Duyck To: david@redhat.com, mst@redhat.com Date: Fri, 08 May 2020 14:30:10 -0700 Message-ID: <20200508213010.26071.6318.stgit@localhost.localdomain> In-Reply-To: <20200508212719.26071.94248.stgit@localhost.localdomain> References: <20200508212719.26071.94248.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::f2b; envelope-from=alexander.duyck@gmail.com; helo=mail-qv1-xf2b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) From: Alexander Duyck Add support for free page reporting. The idea is to function very similar to how the balloon works in that we basically end up madvising the page as not being used. However we don't really need to bother with any deflate type logic since the page will be faulted back into the guest when it is read or written to. This provides a new way of letting the guest proactively report free pages to the hypervisor, so the hypervisor can reuse them. In contrast to inflate/deflate that is triggered via the hypervisor explicitly. Acked-by: David Hildenbrand Signed-off-by: Alexander Duyck --- hw/virtio/virtio-balloon.c | 69 ++++++++++++++++++++++++++++++++= ++++ include/hw/virtio/virtio-balloon.h | 2 + 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 1666132a24c1..53abba290274 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -321,6 +321,67 @@ static void balloon_stats_set_poll_interval(Object *ob= j, Visitor *v, balloon_stats_change_timer(s, 0); } =20 +static void virtio_balloon_handle_report(VirtIODevice *vdev, VirtQueue *vq) +{ + VirtIOBalloon *dev =3D VIRTIO_BALLOON(vdev); + VirtQueueElement *elem; + + while ((elem =3D virtqueue_pop(vq, sizeof(VirtQueueElement)))) { + unsigned int i; + + /* + * When we discard the page it has the effect of removing the page + * from the hypervisor itself and causing it to be zeroed when it + * is returned to us. So we must not discard the page if it is + * accessible by another device or process, or if the guest is + * expecting it to retain a non-zero value. + */ + if (qemu_balloon_is_inhibited() || dev->poison_val) { + goto skip_element; + } + + for (i =3D 0; i < elem->in_num; i++) { + void *addr =3D elem->in_sg[i].iov_base; + size_t size =3D elem->in_sg[i].iov_len; + ram_addr_t ram_offset; + RAMBlock *rb; + + /* + * There is no need to check the memory section to see if + * it is ram/readonly/romd like there is for handle_output + * below. If the region is not meant to be written to then + * address_space_map will have allocated a bounce buffer + * and it will be freed in address_space_unmap and trigger + * and unassigned_mem_write before failing to copy over the + * buffer. If more than one bad descriptor is provided it + * will return NULL after the first bounce buffer and fail + * to map any resources. + */ + rb =3D qemu_ram_block_from_host(addr, false, &ram_offset); + if (!rb) { + trace_virtio_balloon_bad_addr(elem->in_addr[i]); + continue; + } + + /* + * For now we will simply ignore unaligned memory regions, or + * regions that overrun the end of the RAMBlock. + */ + if (!QEMU_IS_ALIGNED(ram_offset | size, qemu_ram_pagesize(rb))= || + (ram_offset + size) > qemu_ram_get_used_length(rb)) { + continue; + } + + ram_block_discard_range(rb, ram_offset, size); + } + +skip_element: + virtqueue_push(vq, elem, 0); + virtio_notify(vdev, vq); + g_free(elem); + } +} + static void virtio_balloon_handle_output(VirtIODevice *vdev, VirtQueue *vq) { VirtIOBalloon *s =3D VIRTIO_BALLOON(vdev); @@ -841,6 +902,12 @@ static void virtio_balloon_device_realize(DeviceState = *dev, Error **errp) virtio_error(vdev, "iothread is missing"); } } + + if (virtio_has_feature(s->host_features, VIRTIO_BALLOON_F_REPORTING)) { + s->reporting_vq =3D virtio_add_queue(vdev, 32, + virtio_balloon_handle_report); + } + reset_stats(s); } =20 @@ -945,6 +1012,8 @@ static Property virtio_balloon_properties[] =3D { VIRTIO_BALLOON_F_FREE_PAGE_HINT, false), DEFINE_PROP_BIT("page-poison", VirtIOBalloon, host_features, VIRTIO_BALLOON_F_PAGE_POISON, true), + DEFINE_PROP_BIT("free-page-reporting", VirtIOBalloon, host_features, + VIRTIO_BALLOON_F_REPORTING, false), /* QEMU 4.0 accidentally changed the config size even when free-page-h= int * is disabled, resulting in QEMU 3.1 migration incompatibility. This * property retains this quirk for QEMU 4.1 machine types. diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-= balloon.h index 3ca2a78e1aca..28fd2b396087 100644 --- a/include/hw/virtio/virtio-balloon.h +++ b/include/hw/virtio/virtio-balloon.h @@ -42,7 +42,7 @@ enum virtio_balloon_free_page_hint_status { =20 typedef struct VirtIOBalloon { VirtIODevice parent_obj; - VirtQueue *ivq, *dvq, *svq, *free_page_vq; + VirtQueue *ivq, *dvq, *svq, *free_page_vq, *reporting_vq; uint32_t free_page_hint_status; uint32_t num_pages; uint32_t actual;