virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] virtio_balloon: do not set pr_dev_info.report unconditionally
@ 2025-12-09 21:23 Dongli Zhang
  2025-12-10  8:09 ` David Hildenbrand (Red Hat)
  0 siblings, 1 reply; 5+ messages in thread
From: Dongli Zhang @ 2025-12-09 21:23 UTC (permalink / raw)
  To: virtualization; +Cc: david, jasowang, xuanzhuo, eperezma, linux-kernel

Do not set vb->pr_dev_info.report unconditionally if
VIRTIO_BALLOON_F_REPORTING is not available.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
 drivers/virtio/virtio_balloon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 74fe59f5a78c..0c39f2415324 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -1034,7 +1034,6 @@ static int virtballoon_probe(struct virtio_device *vdev)
 				 poison_val, &poison_val);
 	}
 
-	vb->pr_dev_info.report = virtballoon_free_page_report;
 	if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_REPORTING)) {
 		unsigned int capacity;
 
@@ -1044,6 +1043,8 @@ static int virtballoon_probe(struct virtio_device *vdev)
 			goto out_unregister_oom;
 		}
 
+		vb->pr_dev_info.report = virtballoon_free_page_report;
+
 		/*
 		 * The default page reporting order is @pageblock_order, which
 		 * corresponds to 512MB in size on ARM64 when 64KB base page
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-18  8:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-09 21:23 [PATCH 1/1] virtio_balloon: do not set pr_dev_info.report unconditionally Dongli Zhang
2025-12-10  8:09 ` David Hildenbrand (Red Hat)
2025-12-10 19:10   ` Dongli Zhang
2025-12-17  4:52     ` Michael Kelley
2025-12-18  8:34       ` David Hildenbrand (Red Hat)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).